| dendro_data {ggdendro} | R Documentation |
This function provides a generic mechanism to extract relevant plotting data, typically line segments and labels, from a variety of cluster models.
dendro_data(model, ...)
model |
object of type hclust, dendrogram, tree or kmeans |
... |
ignored |
In the case of dendrograms and tree models, the function will extract line segment data and labels.
In the case of kmeans or Mclust models, the function extracts the cluster allocation.
a list of data frames that contain the data appropriate to each cluster model
There are several implementations for specific cluster algorithms:
To extract the data for line segments, labels or leaf labels use:
segmentthe line segment data
labelthe text for each end segment
leaf_labelthe leaf labels of a tree diagram