Subject: Re: [R] "Executing" a string
From: Paul Gilbert (pgilbert@bank-banque-canada.ca)
Date: Thu 12 Oct 2000 - 00:16:14 EST
Message-ID: <39E4762E.19E2B145@bank-banque-canada.ca>
>> Can anybody give me a pointer?
> eval(parse(text="2+2"))
>[1] 4
>Also check out substitute(), as.name() et al. for other methods of
>manipulating expressions and function calls
You should also consider do.call() if the string is actually the name of
a function.
Paul Gilbert
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b25 : Thu 01 Feb 2001 - 16:14:27 EST