From cberry@tajo.ucsd.edu  Tue Nov  7 18:41:42 2000
From: cberry@tajo.ucsd.edu (Charles C. Berry)
Date: Tue, 7 Nov 2000 10:41:42 -0800 (PST)
Subject: [Rd] Re: [R] .Last.value or % or ANS or ... (was unix)
In-Reply-To: <Pine.LNX.4.10.10011200441280.1937-100000@bolker.zoo.ufl.edu>
Message-ID: <Pine.GSO.4.05.10011071028180.317-100000@tajo.ucsd.edu>


ESS comes fairly close to providing this capability:

M-p  plays comint-previous-input

C-u number M-p plays goes back thru 'number' inputs

comint-previous-input clobbers the existing command line, so to get

> abc(<k-th last command line>)

you would need to type

abc( RET C-u k M-p )

or 

abc( RET M-p ... M-p )

hitting M-p k times

Admittedly, this is NOT the same as having a stack of objects...

Chuck Berry

On Mon, 20 Nov 2000 ben@zoo.ufl.edu wrote:

> 
>   That's true, but I was looking for a more comprehensive solution (which
> would be harder to implement, and have the potential to gobble memory like
> crazy) of being able to retrieve an list of past values -- "oh, that
> third-to-last answer is the one I needed, I'll take that and put it in
> this expression"
>   (Besides which, 4 characters are better than 11 but worse than 1 or 2)
> 
>   I've moved this to R-devel.
> 
> On Tue, 7 Nov 2000, Mark Myatt wrote:
> 
> > Yves Gauvreau <cyg@sympatico.ca> writes:
> > >... and Matlab uses "ans" and Mathematica effectively uses %, %%
> > >
> > >Would be nice to have something simpler than .Last.value
> > 
> > Perhaps I am stating the obvious or being extremely stupid but you can
> > create a function:
> > 
> >         lv <- function()
> >          {
> >          .Last.value
> >          }
> > 
> > And then use lv() whenever you need .Last.value.
> > 
> > Mark
> > 
> > --
> > Mark Myatt
> > 
> > 
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> > Send "info", "help", or "[un]subscribe"
> > (in the "body", not the subject !)  To: r-help-request@stat.math.ethz.ch
> > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> > 
> > 
> 
> -- 
> 318 Carr Hall                                bolker@zoo.ufl.edu
> Zoology Department, University of Florida    http://www.zoo.ufl.edu/bolker
> Box 118525                                   (ph)  352-392-5697
> Gainesville, FL 32611-8525                   (fax) 352-392-3704
> 
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

Charles C. Berry                        (858) 534-2098 
                                         Dept of Family/Preventive Medicine
E mailto:cberry@tajo.ucsd.edu	         UC San Diego
http://hacuna.ucsd.edu/members/ccb.html  La Jolla, San Diego 92093-0645

 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] Re: [R] .Last.value or % or ANS or ... (was unix)
Charles C. Berry