[BioC] How to sort a matrix based on its column names andpreserving the identical column names

J.Oosting at lumc.nl J.Oosting at lumc.nl
Fri Aug 3 15:18:46 CEST 2007


mat<-mat[,order(colnames(mat))]

Jan

> How to sort a matrix based on its column names and preserving the
> identical column names.
> 
> when I use mat [, sort(colnames(mat))], sort changes all column names
to
> unique ones. for ex,  if the name of 2 columns is col, the 2nd will be
> changed to col.1 whereas I want to keep the col name for the two
columns
> 
> col    col -> col   col.1



More information about the Bioconductor mailing list