add.species.to.genus: Add species to genus on a phylogeny or bind simulated species...

Description Usage Arguments Details Value Author(s) References See Also

View source: R/add.species.to.genus.R

Description

add.species.to.genus adds an additional species to a genus on a phylogeny. genus.to.species.tree simulates pure-birth subtrees and then binds them at a random height along the terminal edge leading to each corresponding genus on a genus-level backbone tree.

Usage

1
2
add.species.to.genus(tree, species, genus=NULL, where=c("root","random"))
genus.to.species.tree(tree, species)

Arguments

tree

an object of class "phylo". In the case of genus.to.species.tree this should be a genus-level backbone tree.

species

string contain species name in the format "Genus_species" or "Genus species".

genus

for add.species.to.genus, optional argument containing the genus to which species is to be attached. If NULL then genus will be extracted from species.

where

for add.species.to.genus, the location to attach species to the tree. where= "root" will cause the species to be attached to the MRCA of all members of genus. where="random" will cause species to be attached at random to the subtree descended from the MRCA of all members of genus.

Details

For add.species.to.genus, if genus contains only one species and where="root", then species will be attached midway along the branch leading to the one species. If where="random" then species will be added at a random position along the edge. If genus cannot be found in the tree, then the original tree is returned and a warning printed. If the tree is not ultrametric, then the resultant tree may not contain branch lengths and a warning will be printed. If genus is non-monophyletic then species will be attached to the most inclusive group containing members of genus and a warning will be printed.

Value

An object of class "phylo".

Author(s)

Liam Revell [email protected]

References

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

See Also

add.random, bind.tip


liamrevell/phytools documentation built on Nov. 22, 2018, 5:21 p.m.