From ripley@stats.ox.ac.uk  Sat Aug  3 11:25:29 2002
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Sat, 3 Aug 2002 11:25:29 +0100 (BST)
Subject: offset arg (was Re: [R] variable scope)
In-Reply-To: <x27kj8i80l.fsf@biostat.ku.dk>
Message-ID: <Pine.LNX.4.31.0208031115300.7467-100000@gannet.stats>

On 3 Aug 2002, Peter Dalgaard BSA wrote:

> Another example that has come back to haunt us several times is
> lm(...,data=d,offset=foo). The problem is that we want "foo" to be
> found inside "d" if present, but call-by-value semantics imply that it
> is an object in the caller's scope. You really ought to pass the name
> "foo" (or maybe better: quote(foo), or a formula ~foo).

Should we not just deprecate the offset argument in lm and glm?  Using the
offset() function in the formula works as one would expect (at least if
one remembers the R rules which start at the formula's environment).

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


offset arg (was Re: [R] variable scope)
ripley@stats.ox.ac.uk