prune_tree: Prunes an 'rpart' tree to have the desired number of nodes.

Description Usage Arguments Value

View source: R/prune_tree.R

Description

Prunes an rpart tree to have the desired number of nodes.

Usage

1
prune_tree(tree, maxn)

Arguments

tree

the tree to prune, an rpart object.

maxn

desired number of terminal nodes.

Value

The pruned tree, an rpart object.


jlctree documentation built on April 15, 2021, 5:06 p.m.