hclustplot | R Documentation |
Draw a standard dendrogram with clustering annotation in the marginal regions and colored labels.
hclustplot(hc, k = NULL, h = NULL, colors = NULL, labels = NULL,
fillbox = FALSE, heights = c(1, .3), mar = c(1, 1, 0, 1), ...)
hc |
an object of the type produced by |
k |
an integer scalar or vector with the desired number of
groups. Redirected to function |
h |
numeric scalar or vector with heights where the tree should
be cut. Redirected to function |
colors |
a numerical or character vector with the same length as ‘hc’ specifying the colors of the labels. |
labels |
a character vector with the same length as ‘hc’ containing the labels to be written. |
fillbox |
logical, if TRUE clustering annotation will be drawn as filled boxes below the dendrogram. |
heights |
numeric vector of length two specifying the values for
the heights of rows on the device. See function |
mar |
a numerical vector of the form ‘c(bottom, left, top, right)’ which gives the number of lines of margin to be specified on the four sides of the plot. If left at default the margins will be adjusted upon adding arguments ‘main’, ‘ylab’, etc. |
... |
other graphical parameters passed to functions
|
This function adds extended visualization of cluster membership to a
standard dendrogram. If ‘k’ or ‘h’ is provided a call to
cutree
will provide cluster membership
information. Alternatively a vector of colors or cluster membership
information can be provided through argument ‘colors’.
See examples for further details on usage.
Called for its effect.
Argument ‘horiz=TRUE’ currently not supported.
Lars Skjaerven
Grant, B.J. et al. (2006) Bioinformatics 22, 2695–2696.
plot.hclust
, plot.dendrogram
,
hclust
, cutree
.
# Redundant testing excluded
attach(transducin)
##- perform RMSD clustering
rd <- rmsd(pdbs, fit=TRUE)
hc <- hclust(as.dist(rd))
##- draw dendrogram
hclustplot(hc, k=3)
##- draw dendrogram with manual clustering annotation
#hclustplot(hc, colors=annotation[, "color"], labels=pdbs$id)
detach(transducin)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.