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

PCMTreeGetPartition(tree)

Arguments

tree

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

Value

a named integer vector with elements equal to the starting nodes for each part in tree and names equal to the labels of these nodes.

Details

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

See also

Examples

set.seed(1, kind = "Mersenne-Twister", normal.kind = "Inversion") PCMTreeGetPartition(PCMTree(ape::rtree(20)))
#> 21 #> 21