Graft a Subtree onto the Original Tree

DESCRIPTION:

Allows the user to graft a subtree onto the tree from which it was selected.

USAGE:

graft.tree(tree, subtree, where) 

REQUIRED ARGUMENTS:

tree
fitted model object of class tree. This is assumed to be the result of some function that produces an object with the same named components as that returned by the tree() function.
subtree
fitted model object of class tree or singlenode to be grafted onto tree.

OPTIONAL ARGUMENTS:

where
the node number of tree where subtree is to be grafted on.

VALUE:

Tree object similar to tree with subtree grafted on. The check for graftability requires that the observations at the root node of subtree are identical to those at the specified node of tree. This function is called by edit.tree() after regrowing left and right splits.

SEE ALSO:

, .