[R] unevaluated expression

Duncan Murdoch murdoch at stats.uwo.ca
Thu Oct 12 16:25:46 CEST 2006


On 10/12/2006 10:03 AM, johan Faux wrote:
> Hello,
> 
> x<- "something(a+b) + c"
> 
> is there any function F such that 
> 
> F(x)  gives me the unevaluated value of x, i.e. something(a+b)+c
> 
> I would appreciate any help on this

parse(text=x) or parse(text=x)[[1]], depending whether you want an 
"expression" containing that expression, or the "call" that it actually 
corresponds to.

quote(something(a+b) + c)

would get you directly to the latter.

Duncan Murdoch



More information about the R-help mailing list