Entering edit mode
20 months ago
Info.shi
▴
30
Hi Everyone,
I was trying to draw a cut-off line to 0.02 in the dendrogram, but I could not draw the line.
Kindly please help me.
My R code is as follows-
y=as.matrix(matrix)
hc <- hclust(as.dist(1-cor(y, method="spearman")), method="average")
sampleTree = as.dendrogram(hc, method="average")
plot(sampleTree,
main = "Sample Clustering",
ylab = "Height")
cut_avg <- cutree(hc, h = 0.02)
I also attach the dendogram cluster for reference.
Thank you!
Thank you so much it worked. I highly appreciate your help.