This is rather tricky, and it doesn\'t seem to require the same approach for ordering by a typical column in a data frame. I have something that looks like this:
I've had this problem before. Here's how I solved it. Using some iris sample data from base R,
iris
> dat <- iris[sample(nrow(iris), 10), ] > rn <- rownames(dat) > dat[order(as.numeric(rn)), ]