R/PCMTree.R
PCMTreeSplitAtNode.Rd
Slit a tree at a given internal node into a clade rooted at this node and the remaining tree after dropping this clade
PCMTreeSplitAtNode(tree, node, tableAncestors = PCMTreeTableAncestors(tree), X = NULL)
tree | a phylo object |
---|---|
node | an integer or character indicating a root, internal or tip node |
tableAncestors | an integer matrix returned by a previous call to PCMTreeTableAncestors(tree) or NULL. |
X | an optional k x N matrix with trait value vectors for each tip in tree. |
A list containing two named phylo objects:
clade The subtree (clade) starting at node
.
Xclade The portion of X attributable to the tips in clade; NULL if X is NULL.
rest The tree resulting after dropping all tips in the clade.
Xrest The portion of X attributable to the tips in rest; NULL if X is NULL.
In the current implementation, the edge.jump and edge.regime members of the tree will be discarded and not present in the clade.
TODO: preserveRegimes and preserve regimes