referencing values of strings
On Wed, 2004-11-17 at 10:48 -0500, Apoian, Zack wrote:
Say you have a vector named x and a function which returns the character string "x" . How would I take "x" as an input and return the vector x?
If I am understanding you correctly: x <- 1:10
x
[1] 1 2 3 4 5 6 7 8 9 10 x.char <- "x"
get(x.char)
[1] 1 2 3 4 5 6 7 8 9 10 See ?get for more information. HTH, Marc Schwartz