[R] Transforming a string into a command

Petr PIKAL petr.pikal at precheza.cz
Tue Nov 29 09:16:26 CET 2011


> On Nov 29, 2011, at 2:00 AM, Xu Wang wrote:
> 
> > Why don't the following two commands work?
> >
> > eval(parse(text=s))
> > eval(as.expression(s))
> >

Hm, try to set an object s before calling.

Regards
Petr


> ______________________________________________
> R-help at 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.



More information about the R-help mailing list