A.K.
- Original Message -
From: Sam Steingold
To: r-help@r-project.org; Richard M. Heiberger
Cc:
Sent: Monday, December 10, 2012 2:13 PM
Subject: Re: [R] the value of the last expression
> * Richard M. Heiberger [2012-02-09 21:48:50 -0500]:
>
> .Last.value
Thanks; it worked for a wh
K.
>
>
>
>
> - Original Message -
> From: Sam Steingold
> To: r-help@r-project.org; Richard M. Heiberger
> Cc:
> Sent: Monday, December 10, 2012 2:13 PM
> Subject: Re: [R] the value of the last expression
>
>> * Richard M. Heiberger [2012-02-09 2
On Mon, Dec 10, 2012 at 7:13 PM, Sam Steingold wrote:
>> * Richard M. Heiberger [2012-02-09 21:48:50 -0500]:
>>
>> .Last.value
>
> Thanks; it worked for a while, but not anymore:
>
> http://stat.ethz.ch/R-manual/R-patched/library/base/html/Last.value.html
> --8<---cut here
ot attached):
> [1] R.methodsS3_1.4.2 tools_2.15.0
> A.K.
>
>
>
>
> - Original Message -
> From: Sam Steingold
> To: r-help@r-project.org; Richard M. Heiberger
> Cc:
> Sent: Monday, December 10, 2012 2:13 PM
> Subject: Re: [R] the value of the last express
> * Richard M. Heiberger [2012-02-09 21:48:50 -0500]:
>
> .Last.value
Thanks; it worked for a while, but not anymore:
http://stat.ethz.ch/R-manual/R-patched/library/base/html/Last.value.html
--8<---cut here---start->8---
> gamma(1:15)
[1] 1
The "right answer" is .Last.value but I find that far too much to type
so I have the following in my .Rprofile
makeActiveBinding("ans", function().Last.value, .GlobalEnv)
which sets the variable "ans" to be the last value.
Michael
On Thu, Feb 9, 2012 at 9:44 PM, Sam Steingold wrote:
> Is there
.Last.value
On Thu, Feb 9, 2012 at 9:44 PM, Sam Steingold wrote:
> Is there an analogue of common lisp "*" variable which contains the
> value of the last expression?
> E.g., in lisp:
> > (+ 1 2)
> 3
> > *
> 3
>
> I wish I could recover the value of the last expression without
> re-evaluating it
Is there an analogue of common lisp "*" variable which contains the
value of the last expression?
E.g., in lisp:
> (+ 1 2)
3
> *
3
I wish I could recover the value of the last expression without
re-evaluating it.
thanks
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.
8 matches
Mail list logo