Skip to content
Prev 207755 / 398506 Next

Executing a R-string

m <- c(1,4,2,3,7,5)
S <- "which(m==4)"
P <- parse(text=S)
R <- eval(P)
R

Before you do this, see fortune(106)
If the answer is parse() you should usually rethink the question.
  -- Thomas Lumley
     R-help (February 2005)
On Wed, Jan 27, 2010 at 8:59 AM, Joe Trubisz <jtrubisz at mac.com> wrote: