Learn R Programming

motmot.2.0 (version 1.1.2)

node.descendents: Identify nodes and tips descended from a node (internal function).

Description

Obtains a vector of the tips and nodes subtending from a node in a phylogeny.

Usage

node.descendents(x, phy, tip.labels = FALSE)

Arguments

x

A positive integer

phy

An object of class "phylo" (see ape package).

tip.labels

Logical - output tip.labels?

Value

Returns a vector of node and tip ids descended from the tip(s) "x". If tip.labels=TRUE then returns a list of node ids and tip labels.

Details

This function is stolen from the clade.members function in the CAIC package but returns both node and tip id's.