[Rd] Bug in points.formula (PR#6652)

Peter Dalgaard p.dalgaard at biostat.ku.dk
Mon Mar 8 14:34:13 MET 2004

Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:

> What I think we need is the number of rows of the model frame *before
> subsetting*, so that any further arguments (and there are none such in
> Martin's example) of the same length as the response get subsetted.
> Berwin's fix is ugly, and I think it can be avoided by using model.frame
> to do the work by manipulating ... rather carefully so e.g. col gets read 
> from the model frame and hence subsetted -- that would also allow col to 
> be written in terms of other variables in the model frame.
> I need to spend more time thinking about this in detail.

It's a can of worms... It opens up the whole nonstandard evaluation
mess again. One problem is that a "col" (or pch or cex, etc) of
length one might not be in "data" (I remember Brian at the time being
a source of good arguments as to why you might want it to be so).
Another is that short vectors may be intended to be recycled (this is
a bit tenuous, but it was put forward at the time and is the reason
why the code doesn't just test for length one args). 

Actually Berwin's fix is not too bad (at least it is to the point),
and I suggest we use it for now rather than try to wrestle the entire
beast (umm, can of worms...). If we want to keep some clarity, we can
keep what we have and special-case is.null(l).

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

More information about the R-devel mailing list