On Feb 9, 2011, at 2:20 PM, Erik Iverson wrote:
Mark Knecht wrote:
Title asks it all.
Thanks in advance,
Mark
a = 1:5
b1 = 2:6
Z = data.frame(a,b1)
Z
Z$b1
count = 1
MyName = paste("b",count,sep="")
MyName
Z$MyName
Z[[MyName]]
Also:
http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-turn-a-string-into-a-variable_003f
(And Iverson's solution is the "without any of this messing around"
approach.)
David Winsemius, MD
West Hartford, CT
______________________________________________
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.