[R] How do I sort data containts character
Dimitris Rizopoulos
dimitris.rizopoulos at med.kuleuven.ac.be
Tue Jun 8 09:19:38 CEST 2004
try to use:
data.test[order(data.test[,2]),]
I hope this helps.
Best,
Dimitris
----
Dimitris Rizopoulos
Doctoral Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm
----- Original Message -----
From: "Unung Istopo Hartanto" <unung at enciety.com>
To: <r-help at stat.math.ethz.ch>
Sent: Tuesday, June 08, 2004 9:18 AM
Subject: [R] How do I sort data containts character
> Sorry, it's simple question:
>
> example :
> > data.test
> label value
> 1 one 21.35746
> 2 two 22.07592
> 3 three 20.74098
>
> >
>
> I would like the return :
>
> label value
> 3 three 20.74098
> 1 one 21.35746
> 2 two 22.07592
>
> Anyone can help it?
>
> Thanks,
>
> regards
>
> Unung Istopo
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list