# NOT RUN {
library(amap)
hc <- hcluster(USArrests)
# the full plot:
dendro(hc, k = 24, min.gap = 0.00)
# aggregation splits within 0.02 maximum height
dendro(hc, k = 24, min.gap = 0.02)
# the same graphic with spline curves instead of straight lines.
dendro(hc, k = 24, min.gap = 0.02, spline = TRUE)
# olive oil data
sx <- scale(olives[,-c(1,2,11)])
hc <- hcluster(sx)
plot(hc)
dendro(hc, 120, color.id = 6, min.gap=0.005)
dendro(hc, 120, color.id = 6, min.gap=0.1)
dendro(hc, 120, color.id = 6, min.gap=0.1, spline = TRUE)
# }
Run the code above in your browser using DataLab