> "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
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
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
> "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
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