[R] t() converts data.frames ind matrix

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Aug 20 17:31:03 CEST 2002

Jan Malte Wiener wrote:
> hi,
> i just recognized  that the t() function converts a data frames into a
> matrix (R 1.5). is that a bug or a feature ?

It's a feature. You cannot transpose a data.frames, so implicitly you
convert the data.frame to a matrix and transpose that matrix! See code
of t.data.frame().

Uwe Ligges
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list