[R] Independant column sorting using sort.list

Jeremy Z Butler jeremybutler at paradise.net.nz
Wed Dec 11 00:05:04 CET 2002


Hi,
I'm trying to _independantly_ sort the columns of a data frame. 

Using:
> varespec[sort.list(varespec[,1]),]
the columns are sorted *by the first row*.
 
How would I modify this so that all columns are sorted independantly (the result
being *all* columns are rearranged from smallest to biggest not just the first)?

Cheers, Jeremy




More information about the R-help mailing list