oak (version 0.2.1)

prune: Prune a tree

Description

The function prune removes nodes in a tree whose height is greater than a given threshold.

Usage

prune(.tree, max_height = 1L)

# S3 method for rtree prune(.tree, max_height = 1L)

Arguments

.tree

A tree to be pruned.

max_height

integer. The height imposed to the new tree.

Value

The pruned tree.