get_tnrs_names: Process a character vector of taxon names with TNRS

View source: R/datelife_query_tnrs.R

get_tnrs_namesR Documentation

Process a character vector of taxon names with TNRS

Description

make_datelife_query2 always uses TNRS (Taxonomic Name Resolution Service to process input taxon names, to correct misspellings and taxonomic name variations with tnrs_match(), a wrapper of rotl::tnrs_match_names()).

Usage

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

Arguments

input

Taxon names as a character vector of taxon names. Two or more names can be provided as a single comma separated string or concatenated with c().

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.

Value

A datelifeTNRS object, which is a list of three elements:

$cleaned_names

A character vector of names provided as input.

$tnrs_names

A character vector of taxon names processed with TNRS.

$ott_ids

A numeric vector of Open Tree of Life Taxonomy (OTT) ids.


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