datelifeQuery
objectGo from taxon names to a datelifeQuery
object
make_datelife_query(
input = c("Rhea americana", "Pterocnemia pennata", "Struthio camelus"),
use_tnrs = TRUE,
get_spp_from_taxon = FALSE,
reference_taxonomy = "ott"
)
A datelifeQuery
object, which is a list of three elements:
A phylo
object or NA
, if input is not a tree.
A character vector of cleaned taxon names.
A numeric vector of OTT ids if use_tnrs = TRUE
, or NULL
if use_tnrs = FALSE
.
Taxon names as one of the following:
With taxon names as a single comma separated starting or concatenated with c()
.
As a phylo
or multiPhylo
object, OR as a newick character string.
Whether to use Open Tree of Life's Taxonomic Name Resolution Service (TNRS)
to process input taxon names. Default to TRUE
, it corrects misspellings and
taxonomic name variations with tnrs_match()
, a wrapper of rotl::tnrs_match_names()
.
Whether to search ages for all species belonging to a
given taxon or not. Default to FALSE
. If TRUE
, it must have same length as input.
If input is a newick string with some clades it will be converted to a phylo
object, and the order of get_spp_from_taxon
will match phy$tip.label
.
A character vector specifying the reference taxonomy to use for TNRS. Options are "ott", "ncbi", "gbif" or "irmng". The function defaults to "ott".
It processes phylo
objects and newick character string inputs
with input_process()
. If input
is a multiPhylo
object, only the first phylo
element will be used. Similarly, if an input
newick character string has multiple trees,
only the first one will be used.