Learn R Programming

TreeSearch (version 0.2.2)

DescendantEdges: Descendant Edges

Description

Quickly identifies edges that are 'descended' from a particular edge in a tree

Usage

DescendantEdges(edge, parent, child, nEdge = length(parent))

AllDescendantEdges(parent, child, nEdge = length(parent))

Arguments

edge

number of the edge whose child edges are required

parent

the first column of the edge matrix of a tree of class phylo, i.e. tree$edge[, 1]

child

the second column of the edge matrix of a tree of class phylo, i.e. tree$edge[, 2]

nEdge

number of edges (calculated from length(parent) if not supplied)

Value

`DescendantEdges` returns a logical vector stating whether each edge in turn is a descendant of the specified edge (or the edge itself)

`AllDescendantEdges` returns a matrix of class logical, with row N specifying whether each edge is a descendant of edge N (or the edge itself)

Functions

  • AllDescendantEdges: Quickly identifies edges that are 'descended' from each edge in a tree