Get the starting branch' nodes for each regime on a tree

PCMTreeGetStartingNodesRegimes(tree, preorder = PCMTreePreorder(tree))

Arguments

tree

a phylo object with an edge.regime member denoting regimes. The function assumes that each regime covers a linked set of branches on the tree.

preorder

an integer vector of row-indices in tree$edge as returned by PCMTreePreorder. Defaults to PCMTreePreorder(tree). Specifying this argument may improve performance if PCMTreePreorder had to be called earlier.

Value

an integer with elements equal to the starting nodes for each regime in regimes.

Details

We call a starting branch the first branch from the root to the tips with a given regime. A starting node is the node at which a starting branch ends.

See also