
Number of nodes that must be traversed to navigate from each edge to each other edge within a tree
EdgeDistances(tree)
A tree of class phylo
.
A symmetrical matrix listing the number of edges that must be
traversed to travel from each numbered edge to each other.
The two edges straddling the root of a rooted tree
are counted as a single edge. Add a 'root' tip using AddTip
if the
position of the root is significant.
Other tree navigation:
AllAncestors()
,
AncestorEdge()
,
DescendantEdges()
,
EdgeAncestry()
,
MRCA()
,
NonDuplicateRoot()
# NOT RUN {
tree <- BalancedTree(5)
plot(tree)
ape::edgelabels()
EdgeDistances(tree)
# }
Run the code above in your browser using DataLab