tree_diagram: Tree diagram

View source: R/tree_diagram.R

tree_diagramR Documentation

Tree diagram

Description

Draw a decision tree diagram from a fitted rpart model.

Usage

tree_diagram(object, prob = TRUE, box.palette = "BuOr", ...)

Arguments

object

An rpart object.

prob

Logical indicating whether or not to display leaf node probability estimates for classification trees; default is TRUE.

box.palette

Chjaracter string specifying the palette to use for coloring the nodes; see rpart.plot for details.

...

Additional optional argumebts to be passed onto rpart.plot.

Value

No return value, only called for side effects; in this case, a decision tree diagram constructed by a simple call to rpart.plot.

Note

This function is just a light wrapper around rpart.plot and was used to produce several of the tree diagrams in the accompanying book.


bgreenwell/treemisc documentation built on Oct. 26, 2022, 12:56 a.m.