Learn R Programming

treethresh (version 0.1-11)

subtree: Extract subtree by pruning according to a specified complexity parameter

Description

Extracts a subtree from a tree object of the classes treethresh or wtthresh by pruning according to a specified value of the complexity parameter \(C\).

Usage

# S3 method for treethresh
subtree(object, C)
# S3 method for wtthresh
subtree(object, C)

Arguments

object

An object of the class treethresh or wtthresh from which a subtree is to be extracted.

C

The value of the complexity parameter \(C\) to be used for the pruning.

Value

subtree returns an object of the class treethresh or wtthresh that contains a tree pruned at value \(C\) (see the function prune for details on the pruning process).

See Also

treethresh, wtthresh, prune