Hi group, I did some searches about this very simple question. Hope someone can help me out.
If I have the following: a <- "x <- 2^2" a [1] "x <- 2^2" How do I evaluate the expression that gets me an answer of 4? I tried the following: > eval(a) [1] "x <- 2^2" > get(a) Error in get(a) : object 'x <- 2^2' not found (apparently it's not right!!) I have one long string of commands separated by semi-colon and hope to sort it out. Thank you so much!!! Kel -- View this message in context: http://r.789695.n4.nabble.com/Simple-question-on-eval-tp3066346p3066346.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.