plot_tree: Tree Plots

View source: R/plot_tree.R

plot_treeR Documentation

Tree Plots

Description

This function plots tree structures such as dendrograms and regression trees.

Usage

plot_tree(dat, labels = TRUE, leaf_labels = TRUE, rotate = FALSE, title = NULL)

Arguments

dat

An object representing a dendrogram (e.g. of class hclust), regression tree (e.g. of class rpart), or other tree-like structure.

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.

Details

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.

Examples

hc <- hclust(dist(USArrests))
plot_tree(hc)


dswatson/bioplotr documentation built on March 3, 2023, 9:43 p.m.