hclust and cutree
0
0
Entering edit mode
chris Jhon ▴ 260
@chris-jhon-5047
Last seen 9.7 years ago
Hi, I am using hclust and cutree to cluster a data frame y and cut it into few clusters as follows y V1 V2 V3 V4 A 1 2 3 4 B 5 6 7 8 C 9 10 11 12 D 13 14 15 16 E 17 18 19 20 > clu<-hclust(dist(y),method="complete") clu<-hclust(dist(y),method="complete") > clu Call: hclust(d = dist(y), method = "complete") Cluster method : complete Distance : euclidean Number of objects: 5 > plot(clu) > ct<-cutree(clu,k=3) > rect.hclust(clu,3,border="red") > ct A B C D E 1 1 2 2 3 The question is how to plot the cluster number on the dendrogram plot? Any help is appreciated. [[alternative HTML version deleted]]
• 1.8k views
ADD COMMENT

Login before adding your answer.

Traffic: 641 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