Description Usage Arguments Details Value Note Author(s) See Also Examples
Draw a dendrogram in 2d given clustering results. Leaf order may be specified, allowing comparison to clustering result.
1 2 |
cluster |
Hierarchical clustering result of type |
leaf.order |
A vector containing the order of leaf tips, if NULL, the order specified in |
scale |
Maximum dendrogram height. Width is equal to number of leaves |
dendro.dir |
Direction in which the leaves point. One of "up", "down", "left" or "right" |
order.dir |
Direction in which leaves are ordered. Should be perpendicular to |
origin |
Position of first leaf |
heights |
A vector of heights, which may be used to over-ride the height information included in |
Similar to the plot
command for cluster results of type hclust
. Primarily intended for internal use, but for ease of formatting, may be of use in producing standard dendrogram plots instead of the standard hclust
commands. Also the leaf order, and branch heights used here may be different from that specified in cluster
.
The leaf tips are placed at the integer valued positions (with respect to the origin) specified in the leaf order. This may be used to place labels, colored points etc at the leaf tips.
a ggplot
layer
The leaf heights are scaled so that the maximum height corresponds to scale
.
Satwik Rajaram and Yoshi Oono
1 2 3 4 5 | #compare complete and average linkage
mtcars.cluster<-hclust(dist(mtcars),method="complete")
mtcars.cluster.avg<-hclust(dist(mtcars),method="average")
#ggplot.default()+draw.dendrogram(mtcars.cluster,leaf.order=mtcars.cluster.avg$order)
qplot(x=0,y=0)+draw.dendrogram(mtcars.cluster,leaf.order=mtcars.cluster.avg$order)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.