plot_tree | R Documentation |
This function plots tree structures such as dendrograms and regression trees.
plot_tree(dat, labels = TRUE, leaf_labels = TRUE, rotate = FALSE, title = NULL)
dat |
An object representing a dendrogram (e.g. of class |
labels |
Plot labels? This refers to items for dendrograms, and break points for regression or classification trees. |
leaf_labels |
Plot leaf labels? Only relevant for regression and classification trees. |
rotate |
Rotate plot 90 degrees? |
title |
Optional plot title. |
This function is essentially a wrapper for tools in the ggdendro
package, with a few amendments
and extra options. See the package documentation for more info.
hc <- hclust(dist(USArrests)) plot_tree(hc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.