View source: R/tree_properties.R
NodeOrder | R Documentation |
NodeOrder()
calculates the order of each node: the number of edges
incident to it in a tree.
This value includes the root edge in rooted trees.
NodeOrder(x, includeAncestor = TRUE, internalOnly = FALSE)
x |
A tree of class |
includeAncestor |
Logical specifying whether to count edge leading to ancestral node in calculation of order. |
internalOnly |
Logical specifying whether to restrict to results
to internal nodes, i.e. to omit leaves. Irrelevant if
|
NodeOrder()
returns an integer listing the order of each node;
entries are named with the number of each node.
Martin R. Smith (martin.smith@durham.ac.uk)
Other tree navigation:
AncestorEdge()
,
CladeSizes()
,
DescendantEdges()
,
EdgeAncestry()
,
EdgeDistances()
,
ListAncestors()
,
MRCA()
,
MatchEdges()
,
NDescendants()
,
NodeDepth()
,
NodeNumbers()
,
RootNode()
tree <- CollapseNode(BalancedTree(8), 12:15)
NodeOrder(tree)
plot(tree)
nodelabels(NodeOrder(tree, internalOnly = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.