A list with the following elements:
subtreesList of the same length as nodes
, with each element being a new tree of class "phylo", containing the subtrees descending from the focal nodes. Each subtree will be rooted at the corresponding focal node.
new2old_tipList of the same length as nodes
, with the n-th element being an integer vector with values in 1,..,Ntips, mapping tip indices of the n-th subtree to tip indices in the original tree. In particular, tree$tip.label[new2old_tip[[n]]]
will be equal to subtrees[[n]]$tip.label
.
new2old_nodeList of the same length as nodes
, with the n-th element being an integer vector with values in 1,..,Nnodes, mapping node indices of the n-th subtree to node indices in the original tree.
For example, new2old_node[[2]][1]
is the index that the 1st node of the 2nd subtree had within the original tree. In particular, tree$node.label[new2old_node[[n]]]
will be equal to subtrees[[n]]$node.label
(if node labels are available).
new2old_edgeList of the same length as nodes
, with the n-th element being an integer vector with values in 1,..,Nedges, mapping edge indices of the n-th subtree to edge indices in the original tree. In particular, tree$edge.length[new2old_edge[[n]]]
will be equal to subtrees[[n]]$edge.length
(if edge lengths are available).