Lisa Wang wrote:
> Hi there,
> 
> Could anybody help me on how to sort a dataframe by one variable in the 
> dataframe?
> 
> Thank you
> 

See ?order.

x <- data.frame(a = runif(10), b = 1:10)
x[order(x$a), ]


--sundar

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to