make_datelife_query2: Go from taxon names to a 'datelifeQuery' object

View source: R/datelife_query2.R

make_datelife_query2R Documentation

Go from taxon names to a datelifeQuery object

Description

Go from taxon names to a datelifeQuery object

Usage

make_datelife_query2(
  input = c("Rhea americana", "Pterocnemia pennata", "Struthio camelus"),
  get_spp_from_taxon = FALSE,
  reference_taxonomy = "ott",
  ...
)

Arguments

input

Taxon names as one of the following:

A character vector of taxon names

With taxon names as a single comma separated starting or concatenated with c().

A phylogenetic tree with taxon names as tip labels

As a phylo or multiPhylo object, OR as a newick character string.

get_spp_from_taxon

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.

reference_taxonomy

A character vector specifying the reference taxonomy to use for TNRS. Options are "ott", "ncbi", "gbif" or "irmng". The function defaults to "ott".

...

Arguments passed on to rotl::tnrs_match_names

context_name

name of the taxonomic context to be searched (length-one character vector or NULL). Must match (case sensitive) one of the values returned by tnrs_contexts. Default to "All life".

do_approximate_matching

A logical indicating whether or not to perform approximate string (a.k.a. “fuzzy”) matching. Using FALSE will greatly improve speed. Default, however, is TRUE.

ids

A vector of ids to use for identifying names. These will be assigned to each name in the names array. If ids is provided, then ids and names must be identical in length.

include_suppressed

Ordinarily, some quasi-taxa, such as incertae sedis buckets and other non-OTUs, are suppressed from TNRS results. If this parameter is true, these quasi-taxa are allowed as possible TNRS results.

Details

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.

Value

A datelifeQuery object, which is a list of four elements:

$input_names

A character vector of input taxon names.

$tnrs_names

A character vector of taxon names processed with TNRS.

$ott_ids

A numeric vector of OTT ids.

$phy

A phylo object or NA, if input is not a tree.


datelife documentation built on July 10, 2023, 2:02 a.m.