[R] Simple command
Mark Myatt
mark at myatt.demon.co.uk
Wed Sep 20 10:34:32 CEST 2000
a s <datamanagement at email.com> writes:
>Is there an "execute" command such that:
>execute(paste("X[3]<-5"))
>or
>execute(paste("anything"))
>where "anything" is executed by R??
That is done with eval(parse(text = "<this is the command>")) as in:
example.r.command <- "x[3] <- 5"
eval(parse(text = example.r.command))
or just:
eval(parse(text = "x[3] <- 5"))
Mark
--
Mark Myatt
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list