From ggrothendieck at gmail.com  Sat May 23 02:31:30 2015
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Fri, 22 May 2015 20:31:30 -0400
Subject: [Rd] returnValue()
In-Reply-To: <CAP01uR=ZeVze+n8O0zesN_HKN5BSjZYyw=7fcQCO8qp3c2pJYg@mail.gmail.com>
References: <CAP01uR=ZeVze+n8O0zesN_HKN5BSjZYyw=7fcQCO8qp3c2pJYg@mail.gmail.com>
Message-ID: <CAP01uR=aMpS+J-gQfCJnx9syhXnRxkcmyrWQK1m2bWaL=9y4FA@mail.gmail.com>

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
<ggrothendieck at 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



[Rd] returnValue()
Gabor Grothendieck