[R] Hmisc::rcorr on a 'data.frame'?

2011-08-19 Thread Liviu Andronic
Dear all ?Hmisc::rcorr states that it takes as main argument a numeric matrix. But is it normal that it fails in such an ugly way on a data frame? (See below.) If the function didn't attempt any conversion to a matrix, I would have expected it to state that in the error message that it didn't

Re: [R] Hmisc::rcorr on a 'data.frame'?

2011-08-19 Thread Frank Harrell
I don't see anything wrong with using as.matrix. The documentation doesn't say it will support a data frame. Frank Liviu Andronic wrote: Dear all ?Hmisc::rcorr states that it takes as main argument a numeric matrix. But is it normal that it fails in such an ugly way on a data frame? (See