[R] Sorting a matrix?

Duncan Murdoch murdoch at stats.uwo.ca
Fri Dec 7 21:10:57 CET 2001


I'd like to sort the rows of a matrix, sorting by the values in the
1st column, breaking ties by the 2nd, etc.  I don't know in advance
how many columns there'll be.

Is there a way to force the unknown number of columns of my matrix to
be the ... arguments of order(), or is there another way to do this
(other than a loop)?

Duncan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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