add.species.to.genus {phytools} | R Documentation |
This function adds an additional species to a genus on a phylogeny.
add.species.to.genus(tree, species, genus=NULL, where=c("root","random"))
tree |
an object of class |
species |
string contain species name in the format |
genus |
optional argument containing the genus to which |
where |
location to attach |
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.
An object of class "phylo"
.
Liam Revell liam.revell@umb.edu
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.