From pinard at iro.umontreal.ca  Mon Jun  5 14:11:20 2006
From: pinard at iro.umontreal.ca (=?iso-8859-1?Q?Fran=E7ois?= Pinard)
Date: Mon, 5 Jun 2006 08:11:20 -0400
Subject: [Rd] xy.coords(MATRIX) bug in code or documentation (PR#8937)
In-Reply-To: <20060605093057.288701905F@slim.kubism.ku.dk>
References: <20060605093057.288701905F@slim.kubism.ku.dk>
Message-ID: <20060605121120.GA7192@phenix.sram.qc.ca>

[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



[Rd] xy.coords(MATRIX) bug in code or documentation (PR#8937)
=?iso-8859-1?Q?Fran=E7ois?= Pinard