View source: R/tree_properties.R
EdgeDistances | R Documentation |
Number of nodes that must be traversed to navigate from each edge to each other edge within a tree
EdgeDistances(tree)
tree |
A tree of class |
EdgeDistances()
returns 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 treated as a single edge. Add a "root" tip using AddTip()
if the
position of the root is significant.
Martin R. Smith (martin.smith@durham.ac.uk)
Other tree navigation:
AncestorEdge()
,
CladeSizes()
,
DescendantEdges()
,
EdgeAncestry()
,
ListAncestors()
,
MRCA()
,
MatchEdges()
,
NDescendants()
,
NodeDepth()
,
NodeNumbers()
,
NodeOrder()
,
RootNode()
tree <- BalancedTree(5)
plot(tree)
ape::edgelabels()
EdgeDistances(tree)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.