offset arg (was Re: [R] variable scope)

Robert Gentleman rgentlem@jimmy.harvard.edu
Sat, 3 Aug 2002 07:43:11 -0400


On Sat, Aug 03, 2002 at 01:29:15PM +0200, Peter Dalgaard BSA wrote:
> ripley@stats.ox.ac.uk writes:
> 
> > 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).
> 
> That's a definite possibility, but what about subset (the argument,
> not the function) and weights? 
> 
> Not to mention pch and col in plot.formula et al. where vectorization
> led to some unexpected awkwardness.

 My intention was to include some discussion of just these issues in
 the 8 am session on the 17th.
 I hope that we can use some of these comments at that time as well.



> 
> -- 
>    O__  ---- Peter Dalgaard             Blegdamsvej 3  
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
+---------------------------------------------------------------------------+
| Robert Gentleman                 phone : (617) 632-5250                   |
| Associate Professor              fax:   (617)  632-2444                   |
| Department of Biostatistics      office: M1B20
| Harvard School of Public Health  email: rgentlem@jimmy.dfci.harvard.edu   |
+---------------------------------------------------------------------------+
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._