mtb954 at gmail.com
2013-Jan-17 21:36 UTC
[R] How to convert a string to the column it represents in a dataframe, with a reproducible example
Hello R-helpers, I have run the following lines of code: x<-"cars$dist" y<-noquote(x) Now y is a string containing the characters "cars$dist" My question....is there an R function (or combination of functions) that I can apply to y that will cause y to contain the numbers in cars$dist? Even better, can I do it without using noquote()? Many thanks, Mark Na [[alternative HTML version deleted]]
David Winsemius
2013-Jan-17 22:06 UTC
[R] How to convert a string to the column it represents in a dataframe, with a reproducible example
On Jan 17, 2013, at 1:36 PM, mtb954 at gmail.com wrote:> Hello R-helpers, > > I have run the following lines of code: > > x<-"cars$dist" > y<-noquote(x) > > > Now y is a string containing the characters "cars$dist" > > My question....is there an R function (or combination of functions) that I > can apply to y that will cause y to contain the numbers in cars$dist? Even > better, can I do it without using noquote()?What is the goal of this effort? -- David Winsemius Alameda, CA, USA