Entering edit mode
tmcelrath
•
0
@tmcelrath-10118
Last seen 9.0 years ago
I am using complexheatmap. Rows are biomarker concentrations, columns are individuals. I would like to sort the columns by both binary individual characteristics ( for example: case v. control, male v. female) or continuous characteristics (for example: age). Can someone suggest code to allow this simple classification of data? -TM
Your question isn't very clear, if you want to sort columns this is a basic R question not bioconductor. If you want to sort columns in a heatmap for some reason - normally you would have the columns clustered for you - check the vignette. I use aheatmap for creating heatmaps from genomic data and I find it very easy to use and it has clear documentation - you can easily fix column order in this package using a vector.
http://stackoverflow.com/questions/1296646/how-to-sort-a-dataframe-by-columns