subtree {treethresh}R Documentation

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

subtree(object, C)
subtree.treethresh(object, C)
subtree.wtthresh(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).

Note

subtree.treethresh and subtree.wtthresh should rarely be directly called by the user. The more user-friendly S3 function subtree will take care of calling the right function.

Use the function prune to carry out the pruning without having to specify the complexity parameter C.

See Also

treethresh, wtthresh, prune


[Package treethresh version 0.1-3 Index]