[R] Sorting a data frame

Spencer Graves spencer.graves at pdf.com
Wed Jul 16 16:33:14 CEST 2003


?order

hope this helps.  spencer graves

Wayne Jones wrote:
> Hi there R-Helpers, 
> 
> Does anyone know if it is possible to sort a dataframe?
> 
> I.e. Sort alphabetically column 1 ( which has some reocurring elements) then
> sort alphabetically column2 but keeping the order of column 1 constant; 
> much the same way that the sort function works in Excel.
> 
> Regards, 
> 
> Wayne
> 
> 
> Dr Wayne R. Jones
> Statistician / Research Analyst
> KSS Group plc
> St James's Buildings
> 79 Oxford Street
> Manchester M1 6SS
> Tel: +44(0)161 609 4084
> Mob: +44(0)7810 523 713
> 
> 
> 
> KSS Ltd
> Seventh Floor  St James's Buildings  79 Oxford Street  Manchester  M1 6SS  England
> Company Registration Number 2800886
> Tel: +44 (0) 161 228 0040	Fax: +44 (0) 161 236 6305
> mailto:kssg at kssg.com		http://www.kssg.com
> 
> 
> The information in this Internet email is confidential and m...{{dropped}}
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help




More information about the R-help mailing list