[R] sort dataframe

XinMeng xmeng at capitalbio.com
Tue Feb 6 05:02:27 CET 2007


Hello sir:
How can I sort a dataframe by sorting one of its column?

e.g.

dataframe:

id  x   y
a  0.1  3
b  0.5  1
c  0.2  9
d  0    5

I want the dataframe sorted according to y accending,the result is:

id  x    y
b   0.5  1
a   0.1  3
d   0    5
c   0.2  9



Thanks a lot!

My best



More information about the R-help mailing list