Questions tagged [dendextend]

Questions on the R package dendextend

Filter by
Sorted by
Tagged with
22
votes
6answers
12k views

How do you compare the “similarity” between two dendrograms (in R)?

I have two dendrograms which I wish to compare to each other in order to find out how "similar" they are. But I don't know of any method to do so (let alone a code to implement it, say, in R). Any ...
16
votes
2answers
33k views

Label and color leaf dendrogram

I am trying to create a dendrogram, were my samples have 5 group codes (act as sample name/species/etc but its repetitive). Therefore, I have two issues that a help will be great: How can I show ...
13
votes
3answers
7k views

Extract labels membership / classification from a cut dendrogram in R (i.e.: a cutree function for dendrogram)

I'm trying to extract a classification from a dendrogram in R that I've cut at a certain height. This is easy to do with cutree on an hclustobject, but I can't figure out how to do it on a dendrogram ...
10
votes
3answers
15k views

How to create a dendrogram with colored branches?

I would like to create a dendrogram in R which has colored branches, like the one shown below. So far I used following commands to create a standard dendrogram: d <- dist(as.matrix(data[,29])) ...
10
votes
2answers
660 views

Extract cluster color from output of dendextend::circlize_dendrogram()

I am trying to extract the colors used in the clustering of circlize_dendrogram. Here is a sample codes: library(magrittr) library(dendextend) cols <- c("#009000", "#FF033E", "#CB410B", "#3B444B",...
10
votes
2answers
1k views

Plotting tanglegrams subplots in R using dendextend

I am plotting Tanglegrams in R using dendextend. I am wondering if it is possible to plot multiple subplots using par(mfrow = c(2,2))? I can't seem to figure it out. Thanks library(dendextend) ...
8
votes
3answers
10k views

Tree cut and Rectangles around clusters for a horizontal dendrogram in R

I am trying to plot the results of a hierarchical clustering in R as a dendrogram, with rectangles identifying clusters. The following code does the trick for a vertical dendrogram, but for a ...
7
votes
2answers
3k views

How to colour the labels of a dendrogram by an additional factor variable in R

I have produced a dendrogram after running hierarchical clustering analysis in R using the below code. I am now trying to colour the labels according to another factor variable, which is saved as a ...
6
votes
3answers
6k views

Change Dendrogram leaves

I want to modify the properties of the leaves in a dendrogram produced from plot of an hclust object. Minimally, I want to change the colors, but any help you can provide will be appreciated. I did ...
6
votes
2answers
7k views

How to color the branches and tick labels in the heatmap.2?

I have done a Heat Map using the function heatmap.2 of gplots in R, but I don't have an idea of how to coloring the branches and tick labels per groups (Eg. if I cut the tree to have four gruops like ...
6
votes
2answers
7k views

How to change dendrogram labels in r

I have a dendrogram in R. It is based on hierachical clustering using hclust. I am colouring labels that are different in different colours, but when I try changing the labels of my dedrogram (to the ...
6
votes
1answer
2k views

Dendrogram edge (branch) colors to match tip (leaf) colors (ape package)

I'm trying to add color to the edges (lines) of a phylogeny-type plot in R using the plot.phylo command from the ape package. This example is for a "fan" type plot, though I expect the approach would ...
5
votes
3answers
9k views

How to color a dendrogram's labels according to defined groups? (in R)

I have a numeric matrix in R with 24 rows and 10,000 columns. The row names of this matrix are basically file names from which I have read the data corresponding to each of the 24 rows. Apart from ...
5
votes
1answer
2k views

larger font and spacing between leaves in R dendrogram

I have a dendrogram in R that I just can't get it right. I'll show you what the problem is, please check this: http://img.photobucket.com/albums/v699/rica01/Rplot-1.png How can I make the labels on ...
5
votes
2answers
2k views

Stacked bar plot with hierarchical clustering (dendrogram)

I am trying to get something like this but unfortunately, I could not find any package that could enable me to plot stacked bar plot with dendrogram like the one shown below: Does anyone know how to ...

15 30 50 per page
1
2 3 4 5
…
9