[R] Maintaining sort order when transpose

Dry, Jonathan R Jonathan.Dry at astrazeneca.com
Thu Oct 1 16:04:15 CEST 2009


Hi all - I have a data frame and have sorted it by a particular column, with rownames set to a different variable.  I wish to transpose this data frame, naming columns by the rowname variable but maintaining the sorted order through to the order of columns in my transposed table, however use of  t(DF) results in a transposed table where the columns are ordered alphabetically by the original rownames.  Any ideas how I can get around this?

--------------------------------------------------------------------------
AstraZeneca UK Limited is a company incorporated in Engl...{{dropped:21}}




More information about the R-help mailing list