Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIs it possible to "mirror" a dendrogram? #29
Comments
|
Good question. The function you are looking for is hc <- hclust(dist(USArrests), "ave")
d <- as.dendrogram(hc)
plot(d, horiz = TRUE)
library(dendextend)
d <- d %>% color_branches(k=3) %>% color_labels
par(mar = c(3,7,1,1))
plot_horiz.dendrogram(d, side = TRUE)
Output With regards, |
|
Great, thank you so much! Worked like a charm. |

I have attached the image of the dendrogram I have created. Is there a code in ddextend that can be used to mirror this image? So, I would have the questions on the left, and the tree extending to the left, as an inverse of what is seen here.
I've been looking through the ddextend manual for code to this effect, but have struggled to find any.
Thank you in advance for your help,

Elizabeth