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

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to