motmot.2.0 (version 1.1.2)

cladeIdentity: Identify branches (including tips) descended from a node (internal function).

Description

Internal function to get presence absence of descendent branches from a vector of node numbers. The descendents include the branch leading to the focal node (i.e. node defines the stem group no crown group

Usage

cladeIdentity(phy, nodeIDs, cladeMembersObj = NULL)

Arguments

phy

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

nodeIDs

Vector of node numbers (positive integers).

cladeMembersObj

Matrix of clade membership

Value

matrix Matrix of unique presences for each node id

Details

The function returns a matrix of unique presences given the selected node. If the selected nodes are nested then presences are only recorded for the least inclusive node.

Examples

Run this code
# NOT RUN {
## Read in phylogeny and data from Thomas et al. (2009)
data(anolis.tree)
data(anolis.data)

cladeIdentityMatrix <- cladeIdentity(phy=anolis.tree, nodeIDs=170)
# }

Run the code above in your browser using DataLab