Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getMommy

Upward tip or node to root path


Description

This function is a wrapper around phytools getDescendants (Revell 2012). It returns the node path from a given node or species to the root of the phylogeny.

Usage

getMommy(tree,N,curr=NULL)

Arguments

tree

a phylogenetic tree. The tree needs not to be ultrametric and fully dichotomous.

N

the number of node or tip to perform the function on. Notice the function only works with number, not tip labels.

curr

has not to be provided by the user.

Details

The object 'curr' is created inside the function in order to produce an array of nodes on the path.

Value

The function produces a vector of node numbers as integers, collated from a node or a tip towards the tree root.

Author(s)

Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto

References

Revell, L. J. (2012). phytools: An R package for phylogenetic comparative biology (and other things). Methods in Ecology and Evolution, 3: 217-223.doi:10.1111/j.2041-210X.2011.00169.x

Examples

data("DataApes")
DataApes$Tstage->Tstage

getMommy(tree=Tstage,N=12)

RRphylo

Phylogenetic Ridge Regression Methods for Comparative Studies

v2.5.0
GPL-2
Authors
Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto
Initial release
2020-12-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.