Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

Re: [R] Replacement in an expression - can't use parse()

Thomas Lumley

2007-03-27

Replies:

On Tue, 27 Mar 2007, Peter Dalgaard wrote:

>The way around this is to add a further layer of substitute() to insert
>the value of e:

>> eval(substitute(substitute(call,list(u2=quote(x),u3=1)),list(call=e[[1]])))
> u1 + x + 1

Or eval(do.call(substitute, list(e[[1]], list(u2=quote(x),u3=1)))

 -thomas

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
©2008 r-help.com - Jax Systems, LLC, U.S.A.