Dear R People:

Hope you're having a nice day.

Here is a character vector:

> yz
[1] "pexp(3.2,rate=1)"
> str(yz)
 chr "pexp(3.2,rate=1)"
>
And I would like to evaluate that vector.

I tried:
> eval(as.expression(yz))
[1] "pexp(3.2,rate=1)"
>

But that doesn't work.

Any suggestions would be most welcome.  I have a feeling that it's
quite simple and that I'm having a forest vs. trees issue.

Thanks,
Erin


-- 
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com

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

Reply via email to