Mark Knecht
2011-Feb-09 19:16 UTC
[R] How to properly use a generated test string as a name?
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 N = as.name(MyName) Z$N
Erik Iverson
2011-Feb-09 19:20 UTC
[R] How to properly use a generated test string as a name?
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$MyNameZ[[MyName]]