How to get subclusters from the function aheatmap in R.
0
0
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
R • 2.2k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

Traffic: 2577 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6