[R] Sorting elements in a data.frame

Dan Bolser dmb at mrc-dunn.cam.ac.uk
Wed Jun 23 20:29:54 CEST 2004


Hi,

I have data like this....

print(x)

ID	VAL1	VAL2
1	2	6
2	4	9
3	45	12
4	99	44

What I would like is data like this...

ID	VAL1	VAL2
1	2	6
2	4	9
3	12	45
4	44	99


So that my analysis of the ratio VAL2/VAL1 is somehow uniform.

Any advice is welcome!

Dan.




More information about the R-help mailing list