View source: R/phylomatic_like.R
phylomatic_like | R Documentation |
Subsets a master phylogenetic tree using a provided list of taxon names, similarly to the 'phylomatic' function at https://phylodiversity.net/.
phylomatic_like(
tax,
tree = NULL,
dataset = "fungi",
keep_closest = T,
sep = "_"
)
tax |
a vector with taxon names to pick from the tree. |
tree |
optional, a master tree to be subsetted. |
dataset |
if no 'tree' is provided, select a built-in dataset: 'fungi' (default) or 'plants' |
keep_closest |
if a species is not found in the master tree, attempts to select a tip from a species in the same genus. |
sep |
when keep_closest = T, the separator in the taxon names. |
Differently to phylomatic, the function allows repeated names as input, which will results in repeated tips with zero-length branches.
As built in datasets, the function currently provides the phylogenetic tree with fungal genera from Tedersoo et al. (2018) Fungal Divers 1-25 (option 'fungi'), and the tree with plant species from Zanne et al. (2014) Nature 506: 89-92.
A phylogenetic tree in ape format.
x <- c("Agrostis_stolonifer", "Holcus_sp", "Deschampsia_flexuosa", "Calamagrostis_sp")
phylomatic_like(x, dataset = "plants")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.