1

I am trying to draw rectangles around clusters in a horizontal dendrogram. This works fine as long as I only cut the tree manually, e.g.

dend<-as.dendrogram(hc)
plot(dend, horiz=T)
rect.dendrogram(dend, 3)

However, I also want to highlight clusters found significant by pvlust(), which so far I can only accomplish for a vertical dendrogram with pvrect().

I believe there is more to be done with the rect.dendrogram() function, but I don't understand which values I need to get from pvclust() and where to put those.

Can anyone provide a solution to this? Thanks a lot!

Tal Galili
  • 24,605
  • 44
  • 129
  • 187
apeshifter
  • 19
  • 4
  • I'm not sure. In the meantime, I suggest you take a look at this: http://talgalili.github.io/dendextend/articles/dendextend.html#pvclust-1 If you end up writing up a solution, please make a code submission to dendextend: https://github.com/talgalili/dendextend – Tal Galili Apr 11 '20 at 17:44

0 Answers0