[R] Variable alias

2009-08-01 Thread Daniel Haase

Hi Everyone,

is there the possibility in R to assign a variable to be an alias of  
another one?

Example:

x <- 17
# assign y to be an alias of x
y # returns 17
x <- 4
y # returns 4

Daniel

__
R-help@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.


[R] Last expression entered by user

2009-08-02 Thread Daniel Haase

Hi,

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.


Example:

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


Daniel

__
R-help@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.