I'm looking to write some simple code that will select for certain clusters below a threshold height and highlight them (either with a box or by colour). So far I have used cutree, which selects the clusters I am after, but it also selects all the clusters of size 1.
I've managed to use which to select the clusters I actually want, but as this is only a very small section of the data I have I don't want to have to go through manually to choose these. Is there a way that I can cut the tree but only select clusters bigger than one?
This is the code I'm using at the moment:
plot(hClust,hang = -1,cex=0.5)
abline(h= 0.0018,col = 'blue')
ct <- cutree(hClust, h = 0.0018)
clust <- rect.hclust(hClust, h=0.0018, which = c(1,2,4,8,23))