Dear R People:

Suppose I have the following character string:


> f1
[1] "(1/30)*(20-x)"

My goal is to end up with
y <- (1/30)*(20-x)

How would I do this, please?

I've been experimenting with eval, but no good so far.

As usual, I have the feeling that this is something really simple, but
I can't quite get it.

Thank you in advance for any help.


Sincerely,
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