[R] executing strings

Gabor Grothendieck ggrothendieck at gmail.com
Sun Oct 15 16:40:56 CEST 2006


Try this:

eval(parse(text = "pi + 3"))


On 10/14/06, Lloyd Lubet <lloydl at cybermesa.com> wrote:
> I'd like to excute character strings such as z<-"plot( objects()[1]"; eval(z) and viola I'd have a plot of my first dataframe in the first frame. Unfortunately this approach no longer works.
>
> Help?
>
> Lloyd L
>
> lloydl at cybermesa.com
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>



More information about the R-help mailing list