[R] how to convert string to object?

Wu Gong wg2f at mtmail.mtsu.edu
Sun Oct 17 21:54:49 CEST 2010


Hi,

Please try ?parse and ?eval. Here is an example:

text <- "3*6"
parse(text=text)
eval(parse(text=text))

-----
A R learner.
-- 
View this message in context: http://r.789695.n4.nabble.com/how-to-convert-string-to-object-tp2999281p2999336.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list