[R] How to colour specific edges in a dendrogram

Jan Teichmann teichmann at binf.ku.dk
Mon Aug 1 08:35:54 CEST 2011


Dear Mailing-list

I used hclust to make a dendrogram of 2613 leafs. I also have a list
with the names of certain labels which are of interest and I would like
to visualize their appearance within the dendrogram. I found an example
how to use dendrapply to colour the labels but the problem is that with
2613 leafs I cannot plot the labels as it gets super messy.

I now tried to write a function using dendrapply() to colour the edges
of the leafs of interest red. Unfortunately, I fail writing this
function. Could someone help me out with the stub of a function
colouring edges?

I have the
  dendrogram
  list of labels to colour their edges

I would like to colour the edges between the final leaf node and their
parental node.

Thank you very much for your help!
Jan




More information about the R-help mailing list