additionPrep | R Documentation |
Given a data frame of species and taxonomic assignments, and a phylogeny with some of those species in it, will determine the allowed positions for a particular missing taxon.
additionPrep(tree, addition.statements, missing.sp)
tree |
An ape-style phylogenetic tree. |
addition.statements |
A data frame with some specific formatting. |
missing.sp |
The name of the missing species. |
The add.to column should list a unique genus, a unique family, or a species group, where each entry in the group is a valid taxon separated by a comma. The add.to column will very infrequently have a semi-colon in it. If it does, what it means is that we should attempt to sub out each taxon for a clade, but that if that clade doesn't exist yet, we should remove it for now. Unless one of the taxa separated by a semi-colon is a species group, in which case we should add to what exists of that group, if anything. This could happen if, for example, two species are missing from a genus, and we know that the species are sister, but we don't know where within the genus they go. Importantly, the narrower taxonomic scope taxon should always be listed second here, e.g. if you want the final arrangement for the three species in GenusA to be ((sp1,sp2),sp3), and only sp3 is in there at the moment, then both addition statements for sp1 and sp2 should be written as GenusA; GenusA_sp1, GenusA_sp2. The algorithm will first check whether either species in that group is present. If not, it will bind the taxon in to something within GenusA, which will be sp3. If so, it will bind the taxon in to whichever of sp1 or sp2 is present.
A vector of valid nodes to which to bind missing.sp. Something about warnings and errors too.
Mast et al. 2015. Paraphyly changes understanding of timing and tempo of diversification in subtribe Hakeinae (Proteaceae), a giant Australian plant radiation. American Journal of Botany.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.