[R] Sort a dataframe

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Tue Nov 8 05:53:12 CET 2005


Try: 

dataframeName <- dataframeName[order(dataframeName$ColumnName),]

Cheers

Andrew

On Wed, Nov 09, 2005 at 12:43:13PM +0800, Abd. Rahman Kassim wrote:
> 
> Dear All,
> 
> How can I sort a data frame (using one of the column)?
> 
> Thanks for your support.
> 
> Regards.
> 
> Abd. Rahman Kassim (PhD)
> Head Forest Ecology Branch
> Forest Management & Ecology Program
> Forestry and Conservation Division
> Forest Research Institute Malaysia
> Kepong 52109
> Selangor, Malaysia
> 
> *****************************************
> 
> Checked by TrendMicro Interscan Messaging Security.
> For any enquiries, please contact FRIM IT Department.
> *****************************************
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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

-- 
Andrew Robinson
Senior Lecturer in Statistics                       Tel: +61-3-8344-9763
Department of Mathematics and Statistics            Fax: +61-3-8344-4599
University of Melbourne, VIC 3010 Australia
Email: a.robinson at ms.unimelb.edu.au    Website: http://www.ms.unimelb.edu.au




More information about the R-help mailing list