Skip to content
Prev 170024 / 398506 Next

error in my previous message

You want to do:

temp2 <- matrix(rnorm(10),nc=1,nrow=10)
rownames(temp2) <- c("a","b","c","d","e","f","g","h","i","j")
print(temp2)
o <- order(temp2[,1])
temp2 <- temp2[o,,drop=FALSE]
print(temp2)

Note that it makes no difference if you drop the dimension of a single
column vector or not when passed to order().

/H
On Tue, Feb 10, 2009 at 10:23 PM, <markleeds at verizon.net> wrote: