[Rd] xy.coords(MATRIX) bug in code or documentation (PR#8937)

François Pinard pinard at iro.umontreal.ca
Mon Jun 5 14:11:20 CEST 2006


[Martin Maechler]

> Thanks a lot, Francois, for your careful reading and careful report!

Thanks for being receptive! :-)

>    FrPi> Another problem in the same area: the documentation lies
>    FrPi> about how the function acts when given a data.frame.  From
>    FrPi> the code, a data.frame is processed as if it was a matrix.
>    FrPi> From the documentation, while the data.frame is not mentioned
>    FrPi> explicitely, it is implied in the paragraph explaining how
>    FrPi> a list is processed (because a data.frame is a list).  Some
>    FrPi> reconciliation is needed here as well.

>   [ Though I do slightly mind the word "lies" since
>     I do value the 9th commandment..
>     Not telling the truth *accidentally* is not "lying" ]

Of course.  You know, I merely forgot a smiley, there.  You are right in 
that we should try a bit to spare the extreme susceptibility of some 
people!  On the other hand, there should be limits to the feeling that 
we are always walking on eggs while writing to R-help or R-devel, some 
comfort and happiness is needed, after all. :-)

>Yes; in this case, I propose to just amend the documentation
>explainining that data.frames are treated "as matrices".

Let me add a small comment about data.frames.  It would be a bit awkward 
if a data.frame had two columns "y" and "x" (in that order) and if they 
were interpreted differently after matrix coercion.  I guess the problem 
would not exist if data.frames were really interpreted as lists, the "x" 
and "y" columns could even appear anywhere (untested).

-- 
François Pinard   http://pinard.progiciels-bpi.ca



More information about the R-devel mailing list