function that extract the sequence of nested trees
extract_subtrees(tree, cp)
tree | a tree. A data frame returned by the function |
---|---|
cp | a data frame that summarizes the complexity as explained in the example in Breiman (chap 10, 1984). It is the object |
a list containing the sequence of optimal subtrees.