Please disregard. I was running an older version of R at the time.  In
R version 3.2.0 Patched (2015-04-19 r68205) returnValue() does work.

On Fri, May 22, 2015 at 6:25 PM, Gabor Grothendieck
<ggrothendi...@gmail.com> wrote:
> In R devel rev.66393 (2014-08-15) it was possible to do this:
>
>    trace(optim, exit = quote(str(returnValue())))
>
> but returnValue() does not seem to be available any more.  The above
> was useful to get the output of a function when it was called deep
> within another function that I have no control over.
>
> Has this been replaced by some other equivalent function?
>
> P.S. This demonstrates that it no longer works.  The error message is
> that it cannot find function 'returnValue`:
>
>> trace(optim, exit = quote(str(returnValue())))
> Tracing function "optim" in package "stats"
> [1] "optim"
>> arima(presidents, order = c(1, 0, 0))
> Tracing optim(init[mask], armafn, method = optim.method, hessian =
> TRUE,  .... on exit
> Error in str(returnValue()) : could not find function "returnValue"
>
>
> --
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com



-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to