[R] matrix: rows to columns conversion
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Jul 8 16:10:17 CEST 2002
Rado Bonk <rbonk at host.sk> writes:
> I'm new to "R". I have a matrix of 6x12. I need to produce matrix of
> 12x6, such that rows in new matrix are columns from original matrix, and
> columns in a new matrix are rows from the original one. I was playing
> with rbind(), and cbind() with no success.
t() as in transpose...
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
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