Entering edit mode
7.7 years ago
Mark
▴
10
I'm using aheatmap in the NMF package to construct heat maps of array and RNA-seq data.
I'm trying to extract subclusters of data in the same way that this user was trying to use cutree to extract from hclust objects
I can't seem to find an attribute of the aheatmap object that is of type hclust or interpreble by cutree. Any advice would be greatly appreciated.
A few things I've tried:
library(gplots)
#create some data
d <- matrix(rnorm(120),12,10)
# cluster it
heatmp.obj = aheatmap(d)
# define some clusters
mycl <- cutree(heatmp.obj$Rowv, k=2) #this produces an error
mycl <- cutree(heatmp.obj$Colv, k=2) #this produces an error
Hello Mark!
It appears that your post has been cross-posted to another site: Question also asked and answered on stack overflow.
This is typically not recommended as it runs the risk of annoying people in both communities.