File:Dend12.png
Appearance
Size of this preview: 800 × 409 pixels. Other resolution: 876 × 448 pixels.
Original file (876 × 448 pixels, file size: 11 KB, MIME type: image/png)
Summary
set.seed(123)
dat <- matrix(rnorm(20), ncol=2)
# perform hierarchical clustering
hc <- hclust(dist(dat))
# plot dendrogram
plot(hc)
# get ordering of leaves
ord <- order.dendrogram(as.dendrogram(hc))
ord
# [1] 8 3 6 5 10 1 9 7 2 4
# Same as seen on the dendrogram nodes
# Rotate the branches (1,9) & (7,2,4)
plot(rotate(hc, c("8", "3", "6", "5", "10", "7", "2", "4", "1", "9")), main="Rotated")
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 15:17, 12 August 2023 | 876 × 448 (11 KB) | Brb (talk | contribs) | {{Pre}} set.seed(123) dat <- matrix(rnorm(20), ncol=2) # perform hierarchical clustering hc <- hclust(dist(dat)) # plot dendrogram plot(hc) # get ordering of leaves ord <- order.dendrogram(as.dendrogram(hc)) ord # [1] 8 3 6 5 10 1 9 7 2 4 # Same as seen on the dendrogram nodes # Rotate the branches (1,9) & (7,2,4) plot(rotate(hc, c("8", "3", "6", "5", "10", "7", "2", "4", "1", "9")), main="Rotated") </pre> |
You cannot overwrite this file.
File usage
The following page uses this file: