I have a dendrogram split into 4 clusters. I want to extract the cluster membership for each element in a table. Can someone please advise?
hc <- hclust(dist(USArrests), "complete")
par(cex=0.7, mar=c(5, 8, 4, 1))
plot(hc, xlab="", ylab="", main="", sub="", axes=FALSE)
par(cex=1)
title(xlab="", ylab="", main="Violent crime rates by US state")
axis(2)
rect.hclust(hc,k=4, border = 3:4)