[Rd] returnValue()

Gabor Grothendieck ggrothendieck at gmail.com
Sat May 23 00:25:36 CEST 2015


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



More information about the R-devel mailing list