Displaying 1 result from an estimated 1 matches for "data2004".
Did you mean:
data2003
2004 Nov 04
3
calling a var by name in another var
Hello list,
I'd like to use a variable (or a column of a data frame) by using its name as a
string. E.g.:
Data2003 <- c(150,200,120)
Data2004 <- c(145,211,110)
myvar1 <- "Data2003"
myvar2 <- "Data2004"
# now I'd like do do this
total <- Data2003 + Data2004
# in any way like
# total <- ???(myvar1, myvar2)
# or
# total <- ???(myvar1) + ???(myvar2)
# or something like that
Is there a possibilit...