Roots a tree on the smallest clade containing the specified tips.
RootTree(tree, outgroupTips)RootOnNode(tree, node, resolveRoot = FALSE)
RootOnNode(tree, node, resolveRoot = FALSE)
A tree of class phylo.
phylo
Character vector specifying the names of the tips to include in the outgroup.
integer specifying node (internal or tip) to set as the root.
logical specifying whether to resolve the root node.
RootTree returns a tree of class phylo, rooted on the smallest clade that contains the specified tips.
RootTree
RootOnNode returns a tree of class phylo, rooted on the requested node and ordered in Preorder.
RootOnNode
node
Preorder
RootOnNode: Roots a tree on a specified internal node.
ape::root
EnforceOutgroup
# NOT RUN { tree <- PectinateTree(8) plot(tree) ape::nodelabels() plot(RootTree(tree, c('t6', 't7'))) plot(RootOnNode(tree, 12)) plot(RootOnNode(tree, 2)) # }
Run the code above in your browser using DataLab