On Tue, 19 Jan 2010, Barry Rowlingson wrote:
On Tue, Jan 19, 2010 at 5:37 PM, Charles C. Berry <cbe...@tajo.ucsd.edu>wrote:
Note:
i <- 20
bquote(y ~ poly(x,.(i)))
y ~ poly(x, 20)
I see it now. bquote(y~poly(x,.(i))) gets it's 'i' there and then, sticks
it in the returned expression as the value '20', so any further evaluations
get poly(x,20). This is reminiscent of the way macro languages work...
Yes, bquote() was written to mimic the backquote macro in Lisp, hence its name.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlum...@u.washington.edu University of Washington, Seattle
______________________________________________
R-help@r-project.org mailing list
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.