An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110511/ecd94d61/attachment.pl>
Reordering inputs
2 messages · Dat Mai, Steven Kennedy
You can order each matrix by any column you choose like: a<-matrix(rnorm(20),ncol=2)
a[order(a[,1]),] #orders by column 1
[,1] [,2] [1,] -1.86523489 -1.6920270 [2,] -0.94488744 0.2815087 [3,] 0.02380494 0.2491136 [4,] 0.37295795 0.8156993 [5,] 0.55533366 -0.7053233 [6,] 0.79799294 -0.8224082 [7,] 0.80497452 0.4260842 [8,] 1.12438976 -0.1567863 [9,] 1.29213037 -1.6783762 [10,] 1.33496542 0.7807943