[R] side bars on dendrograms with latticeExtra

audrey audrey at ebi.ac.uk
Mon Sep 17 16:35:56 CEST 2007


Dear all,

I am using the heatmap representations of latticeExtra package and I 
would be interested to draw color side bars representing the groups of a 
factor of interest. From my understanding of :

 > help(dendrogramGrob)
...
     The 'add' argument can be used for additional annotation at the
     base of the dendrogram.  It should be a list with one component
     for each row, with names specifying the type of annotation and
     components specifying the contents.  Currently, the only supported
     name is '"rect"' (which can be repeated), producing rectangles.
     The components in such a case is a list of graphical parameters,
     possibly vectorized, that are passed on to 'gpar'.
...

I should use the argument add. Unfortunately I am not very familiar with 
'gpar' from grid package, and I cannot find the correct syntax to use 
this 'add' argument.

Does anyone has an example of how to draw side bars next to a dendrogram 
produced with latticeExtra?

Thank you,
Audrey



More information about the R-help mailing list