Skip to content
Prev 31719 / 398513 Next

how to order a dataframe ?

On Wed, 07 May 2003 18:20:43 +0200, you wrote in message
<3EB9325B.4010906 at ariase.com>:
Try something like this:

x <- matrix(rnorm(100),10,10)
s <- x[order(x[,1]),]

Now s is a copy of x sorted on the first column.

Duncan Murdoch