getSisters: Get the sister node number, label, or set of nodes for a node...

View source: R/utilities.R

getSistersR Documentation

Get the sister node number, label, or set of nodes for a node or tip

Description

Computes the sister taxon or node.

Usage

getSisters(tree, node, mode=c("number","label"))

Arguments

tree

object of class "phylo".

node

a node number, tip number, node label, or tip label.

mode

an optional string indicating whether to return the node or tip number(s) or the node or tip label(s), if applicable.

Details

This function takes a tree and node or tip number of label and returns the number or label of the sister or sisters to that node or tip.

Value

If mode="number" this function returns an integer or vector containing the node number of numbers of the sister node or tip. If mode="label" then this function returns a list containing up to two vectors: one for the node numbers of labels of sister nodes (if applicable); and the other containing the tip labels of the sister tips.

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

getDescendants, Siblings


phytools documentation built on Nov. 10, 2023, 1:08 a.m.