[R] Read code from character string

Peter Langfelder peter.langfelder at gmail.com
Thu Jun 17 21:38:45 CEST 2010


eval(parse(text="print(9**2)"))

On Thu, Jun 17, 2010 at 12:32 PM, Johannes Huesing
<johannes at huesing.name> wrote:
> Dear expRts,
> I have a character string, say a <- "print(9**2)". How do I execute
> the contents of the string, parsed as R code? Do I have to open a
> connection and use cat(a), and parse it at the other end?



More information about the R-help mailing list