Description Usage Arguments Details Author(s) Examples
View source: R/find_descendant_edges.R
Returns all descendant edges of an internal node for a phylo object.
1 | find_descendant_edges(n, tree)
|
n |
An integer corresponding to the internal node for which the descendant edges are sought. |
tree |
A tree as a phylo object. |
Returns a vector of integers corresponding to row numbers in $edge
or cells in $edge.length
of the descendant edges of the internal node supplied.
Graeme T. Lloyd graemetlloyd@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Create simple four-taxon tree:
tree <- ape::read.tree(text = "(A,(B,(C,D)));")
# Plot tree:
plot(tree)
# Show nodelabels:
nodelabels()
# Show edgelabels (note that edges 5 and 6
# are descendants of node 7):
edgelabels()
# Use find_descendant_edges to show that edges
# 5 and 6 are descendants of node 7:
find_descendant_edges(n = 7, tree = tree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.