
Last chance! 50% off unlimited learning
Sale ends in
RootNode()
identifies the root node of a (rooted or unrooted) phylogenetic
tree.
Unrooted trees are represented internally by a rooted tree with a polytomy
at the root.
RootNode(x)
A tree of class phylo
, or its edge matrix; or a list or
multiPhylo
object containing multiple trees.
RootNode()
returns an integer denoting the root node for each tree.
Badly conformed trees trigger an error.
Test whether a tree is rooted: TreeIsRooted()
phangorn::getRoot()
Other tree navigation:
AncestorEdge()
,
CladeSizes()
,
DescendantEdges()
,
EdgeAncestry()
,
EdgeDistances()
,
ListAncestors()
,
MRCA()
,
NDescendants()
,
NodeDepth()
,
NodeOrder()
,
NonDuplicateRoot()
# NOT RUN {
RootNode(BalancedTree(8))
RootNode(UnrootTree(BalancedTree(8)))
# }
Run the code above in your browser using DataLab