Skip to content
Back to formatted view

Raw Message

Message-ID: <alpine.LRH.2.01.1001191004320.13781@hymn11.u.washington.edu>
Date: 2010-01-19T18:04:32Z
From: Thomas Lumley
Subject: Predict polynomial problem
In-Reply-To: <d8ad40b51001190942o6f616dd6s466cf5a50a8f5c8e@mail.gmail.com>

On Tue, 19 Jan 2010, Barry Rowlingson wrote:

> On Tue, Jan 19, 2010 at 5:37 PM, Charles C. Berry <cberry at 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
tlumley at u.washington.edu	University of Washington, Seattle