inst/examples/example_dendro_twins.R
raw| 1 | ### Demonstrate the twins of agnes and diana, from package cluster |
| 2 | |
| 3 | if (require(cluster)) { |
| 4 | model <- agnes(votes.repub, metric = "manhattan", stand = TRUE) |
| 5 | dg <- as.dendrogram(model) |
| 6 | ggdendrogram(dg) |
| 7 | } |
| 8 | |
| 9 | |
| 10 | if (require(cluster)) { |
| 11 | model <- diana(votes.repub, metric = "manhattan", stand = TRUE) |
| 12 | dg <- as.dendrogram(model) |
| 13 | ggdendrogram(dg) |
| 14 | } |