Hi, everybody

Is there any way to execute a function, which name is stored in a string.
such as:
a <- "ls()"
foo(a) ## same as ls() itself.

Or, to execute a R command, which is stored in a string
such as:
a <- "m1 <- matrix(1:9,3,3)"
foo(a) ## same as the assignment itself

______________________________________________
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