Questions tagged [dendrogram]

A dendrogram (or tree diagram) is a graph used to represent relationships in hierarchical clustering.

Tag usage

Questions on tag should be about implementation and programming problems, not about the statistical or theoretical properties of the technique.
Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

586 questions
4
votes
1 answer

(R) Plot dendrograms BRT models from gbm.step

(previously posted here, to the wrong sub, with not enough info, which was closed, I edited, the edits seem to have been deleted, & the post consigned to purgatory, so apologies for re-posting, I don't know whether the previous post can/should be…
dez93_2000
  • 1,730
  • 2
  • 23
  • 34
4
votes
1 answer

How to append bootstrapped values of cluster's (tree) nodes in NEWICK format in R

I want to make a tree (cluster) using Interactive Tree of Life web-based tool (iTOL). As an input file (or string) this tool uses Newick format which is a way of representing graph-theoretical trees with edge lengths using parentheses and commas.…
Newbie_R
  • 655
  • 7
  • 22
4
votes
2 answers

How to fill a list with a recursive function in R?

I'm working with HAC (Hierarchical Agglomerative Clustering). I've a dendrogram, and I'm trying to save the elements to a file, to make posterior analisys (assign codes to elements by clusters). I have a recursive function which takes a branch of…
4
votes
1 answer

How to hierarchically cluster a data matrix in R?

I am trying to cluster a data matrix produced from scientific data. I know how I want the clustering done, but am not sure how to accomplish this feat in R. Here is what the data looks like: A1 A2 A3 B1 B2 B3 C1 …
jake9115
  • 3,964
  • 12
  • 49
  • 78
4
votes
2 answers

drawing heatmap with dendrogram along with sample labels

Using the heatmap function of made4, I made this heatmap dendrogram from the example file: data(khan) heatplot(khan$train[1:30,], lowcol="blue", highcol="red") How can I add a panel of labels for the samples on the edges of the heatmap, like in…
user248237
4
votes
1 answer

Associated Labels in a dendrogram plot - MATLAB

I have the following set of data stored in file stations.dat : Station A 305.2 321.1 420.9 383.5 311.7 197.1 160.2 113.9 60.5 60.5 64.8 154.3 Station B 281.1 304.0 353.1 231.9 84.6 20.9 11.7 11.9 31.1 75.8 133.0 235.3 Station C…
Saulo Carvalho
  • 139
  • 3
  • 15
4
votes
2 answers

Change leaf color in plot.dendrogram like with plot.phylo of package ape

I am trying to plot the result of agglomerative clustering (UPGMA with Agnes) in the same 'style' as when plotting a tree using the package 'ape'. A simple example I include in the figure below The key issue is that I want to be able to color the…
FM Kerckhof
  • 1,270
  • 1
  • 14
  • 31
4
votes
2 answers

Calculate ordering of dendrogram leaves

I have five points and I need to create dendrogram from these. The function 'dendrogram' can be used to find the ordering of these points as shown below. However, I do not want to use dendrogram as it is slow and result in error for large number of…
Curious
  • 3,507
  • 8
  • 28
  • 30
4
votes
1 answer

How to adjust sizes of x-axis in dendrogram (R)?

I would like to adjust the x-axis in a dendrogram where all the labels are seen, for large data sets. As example, I use iris data here: > iris.data=subset(iris,select=-Species) > d <- dist(iris.data, method="euclidean") > hc <-…
Annie
  • 102
  • 2
  • 7
4
votes
1 answer

Permutation vectors from the CLUSTERGRAM object (MATLAB)

I'm using the CLUSTERGRAM object from the Bioinformatics Toolbox (ver 3.7). MATLAB version R2011a. I'd like to get permutation vectors for row and columns for clustergram, as I can do with dendrogram function: x = magic(10); >> [~,~,permrows] =…
yuk
  • 19,098
  • 13
  • 68
  • 99
3
votes
2 answers

generating high-resolution dendrogram plot in R

I am trying to generate a high-resolution dendrogram in R. The difficulty is that there are more than 200 leaf nodes, and each node is identified by a string. I would like to ensure that each of these string labels is readable in the generated…
user785099
  • 5,323
  • 10
  • 44
  • 62
3
votes
1 answer

Is there a way to extract the height from each leaf of a dendrogram in R?

enter image description here From this dendrogram, I would like to extract the height for each leaf. In this case example, I would like to get back a list like this : list("A" = 2.07, "B" = 5.09, "C" = 3.12, "D" = 2.07, "E" = 3.12) Here's the code…
3
votes
1 answer

How can I find the common parent of two clusters created from scipy.cluster.hierarchy.dendrogram?

I have two clusters that are leaves/nodes from a dendrogram created with scipy.cluster.hierarchy.dendrogram. I want to find the closest common parent of the two clusters. However, I do not have the cluster indices as indicated by the dendrogram. I…
3
votes
1 answer

Changing the font in my ggplot dendrogram

I tried plotting a colorful dendrogram to include in my thesis, and it all works just fine apart from one thing: changing the font. I plotted many dendrograms before, and changing the font was never a problem, but in this code it suddenly is... I…
SasaNoHaus
  • 31
  • 2
3
votes
1 answer

Heatmap of Microarray Data using Pearson Distance

I have been trying to generate a heatmap in R for some microarray data and for the most part have been successful in producing one, based on online instruction, but it does not do exactly what I want. What I would like is to cluster data based on…
Ana
  • 71
  • 1
  • 2
  • 4