Learn R Programming

Claddis (version 0.3.4)

GetDescendantEdges: Gets descendant edges of an internal node

Description

Returns all descendant edges of an internal node for a phylo object.

Usage

GetDescendantEdges(n, tree)

Arguments

n

An integer corresponding to the internal node for which the descendant edges are sought.

tree

A tree as a phylo object.

Details

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.

Examples

Run this code
# NOT RUN {
# Create simple four-taxon tree:
tree <- read.tree(text = "(A,(B,(C,D)));")

# Plot tree:
plot(tree)

# Add nodelabels:
nodelabels()

# Add edgelabels (note that edges 5 and 6
# are descendants of node 7):
edgelabels()

# Use GdtDescendantEdges to show that edges
# 5 and 6 are descendants of node 7:
GetDescendantEdges(7, tree)

# }

Run the code above in your browser using DataLab