Re: [R] the value of the last expression

2012-12-10 Thread arun
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

Re: [R] the value of the last expression

2012-12-10 Thread Duncan Murdoch
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

Re: [R] the value of the last expression

2012-12-10 Thread R. Michael Weylandt
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

Re: [R] the value of the last expression

2012-12-10 Thread Sam Steingold
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

Re: [R] the value of the last expression

2012-12-10 Thread Sam Steingold
> * 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

Re: [R] the value of the last expression

2012-02-09 Thread R. Michael Weylandt
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

Re: [R] the value of the last expression

2012-02-09 Thread Richard M. Heiberger
.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

[R] the value of the last expression

2012-02-09 Thread Sam Steingold
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.