| taxa.tree | R Documentation |
Builds phylogenetic trees for a set of taxa. With the default Open Tree of
Life backend, taxa are grouped by phylum and one induced subtree is built
per phylum, so no tree ever spans above phylum (mammals, angiosperms,
arthropods, etc. come back as separate trees). With source = "fish"
a single dated tree is drawn from the Fish Tree of Life for the ray-finned
fishes in the input.
taxa.tree(species, source = c("otl", "fish"), plot = TRUE, verbose = TRUE)
species |
Character vector of taxon names (typically species). |
source |
Tree source. |
plot |
Logical; if |
verbose |
Logical; print progress messages. Default |
Invisibly, a list with:
treesa named list, one element per phylum (or
"Actinopterygii" for source = "fish"). Each element is
itself a list with tree (a phylo) and
dist (a distance matrix).
unmatchednames that could not be placed (unresolved, absent from the tree, or lacking a phylum in the Open Tree lineage).
Different phyla have no shared, meaningfully calibrated deep phylogeny,
and dated backends are clade-specific, so combining them into one tree is
not sensible. To enforce this, the Open Tree backend looks up each taxon's
phylum (via taxonomy_taxon_info) and builds a separate
tree per phylum. A phylum with fewer than two placed taxa is skipped and
reported.
Open Tree induced subtrees are topology-only; unit edges are assigned when
branch lengths are absent, so dist counts edges between tips. The
"fish" backend returns a dated chronogram, so its dist is a
patristic (time) distance.
downto.tree
## Not run:
# Mixed mammals + plants: returns two separate trees, one per phylum.
taxa.tree(c("Canis lupus", "Canis latrans", "Acer saccharum",
"Acer rubrum", "Alces alces", "Betula alleghaniensis"))
# Dated fish tree (needs the fishtree package):
taxa.tree(c("Thunnus thynnus", "Gadus morhua", "Danio rerio",
"Salmo salar"), source = "fish")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.