View Single Post
Old 07-25-2013, 06:59 AM   #2
Simon Anders
Senior Member
 
Location: Heidelberg, Germany

Join Date: Feb 2010
Posts: 994
Default

Try this:

Code:
hm <- heatmap.2( m )
hc <- as.hclust( hm$rowDendrogram )
cutree( hc, h=10 )
The trick is that heatmap.2 returns an (invisible) list that contains an element "rowDendrogram" which you can feed to cutree (after converting it from a dendrogram object to an hclust object).
Simon Anders is offline   Reply With Quote