[R] Executable expressions

R. Michael Weylandt michael.weylandt at gmail.com
Wed Jan 18 22:22:10 CET 2012


eval(parse(text = a))

But this is rarely a good idea....perhaps you could say a little more
about your overall goal and we could direct you to a more "R"-ish
solution?

library(fortunes)
fortune("rethink")

Michael

On Wed, Jan 18, 2012 at 4:18 PM, Ajay Askoolum <aa2e72e at yahoo.co.uk> wrote:
> Given
>
> a<-"c(1,2,3,4,5)"
>
> How can  I evaluate the variable a to return a (numeric) vector comprising of 1,2,3,4,5? Thanks.
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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