sister_taxa: Identify sister taxa in a phylogeny

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/sister_taxa.R

Description

The function identifies sister taxa (tips on the phylogeny) descending from a particular node in a phylogeny.

Usage

1
sister_taxa(tree, node)

Arguments

tree

an object of class phylo.

node

node number (see details). Can be one or multiple nodes.

Details

The node numbers in an object of class phylo can be visualized by calling nodelabels() after plotting the phylogeny. The sister_taxa() function uses these numbers, so the first node (i.e., the most basal node) number will always be equal to the number of taxa plus one.

Value

Returns an object of class data.frame.

Note

The sister taxa are grouped by the variable sister.clade as either a 1 or a 2 to indicate the different sides of the node in question. The actual numerical values of sister.clade are arbitrary, they could have been called "A" and "B".

Author(s)

Vincenzo A. Ellis vincenzoaellis@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## simulate a phylogenetic tree using the rtree function in the ape package
library(ape)
tree <- rtree(n=10)

## check out node numbers
plot(tree)
nodelabels()

## extract all sister taxa from the root
sister_taxa(tree, 11)

vincenzoaellis/malaviR documentation built on Oct. 10, 2019, 10:55 p.m.