Re: [R] evaluation question

2011-11-23 Thread peter dalgaard
On Nov 23, 2011, at 00:24 , Rolf Turner wrote: >> >> library(fortunes) >> fortune("parse()") > The fortune notwithstanding I find this *specific* use of parse() to be > very, uh, useful! :-) The fortune does say "usually", and there certainly are exceptions, for instance the use in Rcmdr where

Re: [R] evaluation question

2011-11-22 Thread Rolf Turner
On 23/11/11 07:31, R. Michael Weylandt wrote: Good morning Erin, eval(parse(text = "pexp(3.2,rate=1)")) seems to work But the general rule applies: library(fortunes) fortune("parse()") The fortune notwithstanding I find this *specific* use of parse() to be very, uh, useful! :-) cheers,

Re: [R] evaluation question

2011-11-22 Thread Uwe Ligges
On 22.11.2011 19:23, Erin Hodgess wrote: Dear R People: Hope you're having a nice day. Here is a character vector: yz [1] "pexp(3.2,rate=1)" str(yz) chr "pexp(3.2,rate=1)" And I would like to evaluate that vector. I tried: eval(as.expression(yz)) [1] "pexp(3.2,rate=1)" But th

Re: [R] evaluation question

2011-11-22 Thread R. Michael Weylandt
Good morning Erin, eval(parse(text = "pexp(3.2,rate=1)")) seems to work But the general rule applies: library(fortunes) fortune("parse()") Best, Michael On Tue, Nov 22, 2011 at 1:23 PM, Erin Hodgess wrote: > Dear R People: > > Hope you're having a nice day. > > Here is a character vector: >

[R] evaluation question

2011-11-22 Thread Erin Hodgess
Dear R People: Hope you're having a nice day. Here is a character vector: > yz [1] "pexp(3.2,rate=1)" > str(yz) chr "pexp(3.2,rate=1)" > And I would like to evaluate that vector. I tried: > eval(as.expression(yz)) [1] "pexp(3.2,rate=1)" > But that doesn't work. Any suggestions would be most