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