Dear all

I have a simple R question. How do I execute R-code stored in a variable?

E.g if I have a variable which contains some R-code:
c = "reg <- lm(sales$sales~sales$price)"

Is it possible to execute c
E.g like Exec(c)

I hope someone can help.

Thank you
Kim Lillesøe

        [[alternative HTML version deleted]]

______________________________________________
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