Re: [Rd] man page for as.matrix for data frames outdated?

2006-11-04 Thread Martin Maechler
> "Herve" == Herve Pages <[EMAIL PROTECTED]> > on Fri, 03 Nov 2006 10:50:10 -0800 writes: Herve> Hi Martin, Herve> Thanks for the answer! Herve> OK I can use data.matrix to convert a data frame to a numeric Herve> matrix but that's another story. Basically I'm reporting

Re: [Rd] man page for as.matrix for data frames outdated?

2006-11-03 Thread Bill Dunlap
On Fri, 3 Nov 2006, Herve Pages wrote: > > df5 <- data.frame(toto=c("a","bb"), titi=c(9,999)) > > as.matrix(df5) > toto titi > 1 "a" " 9" > 2 "bb" "999" > ... > 2) the questionable decision to do this conversion using 'format' >(leading to the addition of unnecessary wh

Re: [Rd] man page for as.matrix for data frames outdated?

2006-11-03 Thread Herve Pages
Hi Martin, Thanks for the answer! OK I can use data.matrix to convert a data frame to a numeric matrix but that's another story. Basically I'm reporting 2 problems with 'as.matrix' when applied to a data frame: 1) A documentation problem: "The method for data frames will convert any non

Re: [Rd] man page for as.matrix for data frames outdated?

2006-11-03 Thread Martin Maechler
> "Herve" == Herve Pages <[EMAIL PROTECTED]> > on Thu, 02 Nov 2006 20:46:01 -0800 writes: Herve> Hi again, The man page for 'as.matrix' says: >> 'as.matrix' is a generic function. The method >> for data frames will convert any non-numeric/complex >> column into a cha

[Rd] man page for as.matrix for data frames outdated?

2006-11-02 Thread Herve Pages
Hi again, The man page for 'as.matrix' says: 'as.matrix' is a generic function. The method for data frames will convert any non-numeric/complex column into a character vector using 'format' and so return a character matrix, except that all-logical data frames will be coerced