if (FALSE) {
# library(dendextend)
d <- dist(USArrests)
hc <- hclust(d, "ave")
dend <- as.dendrogram(hc)
heatmap(as.matrix(USArrests))
dend2 <- seriate_dendrogram(dend, d)
heatmap(as.matrix(USArrests), Rowv = dend)
}
Run the code above in your browser using DataLab