Skip to content

heatmap ordered list

2 messages · Andrea Zangrando, Martin Maechler

#
Hi,
another problem on heatmaps... after generating the graph with

myBlRd <- colorRampPalette(c("blue", "red"))
heatmap(dataHeat[Top100, ], col=myBlRd(15))

i need to retrieve the row names' list ordered by the dendrogram.
I tried with   "rownames(data)[Top100]"   but the list is not ordered 
(as i can see in the generated picture). Any tips?

Tnx
AZ
#
Andrea> Hi,
    Andrea> another problem on heatmaps... after generating the graph with

    Andrea> myBlRd <- colorRampPalette(c("blue", "red"))
    Andrea> heatmap(dataHeat[Top100, ], col=myBlRd(15))

    Andrea> i need to retrieve the row names' list ordered by the dendrogram.
    Andrea> I tried with   "rownames(data)[Top100]"   but the list is not ordered 
    Andrea> (as i can see in the generated picture). Any tips?

Main tip :  do read the help page for functions you are using.
2nd  tip :  There's a section called  "Value:"
3rd  tip :  hence use
	    r <- heatmap(...) ## and work with 'r'

Regards,
Martin Maechler, ETH Zurich