[R] Last expression entered by user

Daniel Haase dh at haase-zm.de
Sun Aug 2 11:02:15 CEST 2009


I am looking for a way to find out the last expression that was  
entered by the user, similar to ".Last.value", but for the unevaluated  
expression instead of the evaluated one.

> x <- 4
> x*x + 3
[1] 19
> .Last.value # that's the evaluated last expression
[1] 19
# but I am looking for the unevaluated expression (".Last.expression",  
so to say), which would be expression(x * x + 3) in this case


More information about the R-help mailing list