plot_tree: Plot classification tree

Description Usage Arguments Value Examples

Description

Plot classification tree

Usage

1
2
plot_tree(mytree, ylim = c(0, 1.2 * max(mytree$height)), labels_ab = FALSE,
  nclust)

Arguments

mytree

a hierarchical tree as returned by hclust

ylim

the y range of values on the plot

labels_ab

if TRUE label with custom names ("a","b","aa","ab", etc.)

nclust

number of clusters to consider to cut tree

Value

a plot

Examples

1
2
3
4
5
hc <- hclust(dist(USArrests), "ave")
plot_tree(hc)
plot_tree(hc,nclust=4)
plot_tree(hc,labels_ab=TRUE)
plot_tree(hc,labels_ab=TRUE, ylim=c(40,150))

lvaudor/classMapR documentation built on May 7, 2019, 10:54 p.m.