Hi everyone, I was just wondering if there is an equivalent in R to the shortcut "Ans" in MatLab whereby I can use the previous result for the current command? This could save a lot of time when hacking in R itself, not from an editor. Thanks, Stephane [[alternative HTML version deleted]]
Something like this? R> mean(rnorm(100)) [1] -0.0095774 R> .Last.value [1] -0.0095774 Andy> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of Stephane > Sent: Tuesday, June 30, 2009 2:07 PM > To: r-help at r-project.org > Subject: [R] Equivalent to Matlab's "Ans" > > Hi everyone, > I was just wondering if there is an equivalent in R to the > shortcut "Ans" in > MatLab whereby I can use the previous result for the current > command? This > could save a lot of time when hacking in R itself, not from an editor. > > Thanks, > Stephane > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >Notice: This e-mail message, together with any attachme...{{dropped:12}}
There is a discussion on this topic under the heading "A shorter version of .Last.value" on July 7, 2008, see for example http://www.nabble.com/A-shorter-version-of-%22.Last.value%22--to18322831.html#a18322831 --Hans Werner Stephane-18 wrote:> > Hi everyone, > I was just wondering if there is an equivalent in R to the shortcut "Ans" > in > MatLab whereby I can use the previous result for the current command? This > could save a lot of time when hacking in R itself, not from an editor. > > Thanks, > Stephane > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/Equivalent-to-Matlab%27s-%22Ans%22-tp24276877p24278620.html Sent from the R help mailing list archive at Nabble.com.