[R] evaluate a expression
sdorairaj at gmail.com
Sat May 2 14:46:02 CEST 2009
Try: eval(parse(text = expr))
On Sat, May 2, 2009 at 5:39 AM, Ning Ma <pningma at gmail.com> wrote:
> I am new to R. Can anyone tell me how to evaluate an expression stored
> in a string?
> such as:
>> expr <- "3*5"
> I want to get the result 15.
> Thanks in advance.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help