get_ids: Return the accepted taxonomic identifier,...

Description Usage Arguments Value Examples

View source: R/get_ids.R

Description

Return the accepted taxonomic identifier, acceptedNameUsageID given a scientific name

Usage

1
2
3
4
5
6
get_ids(
  name,
  provider = getOption("tl_default_provider", "itis"),
  version = tl_latest_version(),
  dir = tl_dir()
)

Arguments

name

character vector of scientific names

provider

Abbreviation for a known naming provider. Provider data should first be imported with [tl_create]. Note: setting provider to "itis_test" is for testing purposes only, use "itis" for the full ITIS data. See details

version

version of the authority to use (e.g. four-digit year)

dir

storage location for the LMDB databases

Value

a vector of matching accepted identifiers. Note that if the name provided is considered to be a synonym by the provider, then the ID corresponds to the accepted name and not the synonym. (i.e. get_names(get_ids(synonym))) will return the accepted name and not the synonym name.

Examples

1
2
3
 # slow initial import
sp <- c("Dendrocygna autumnalis", "Dendrocygna bicolor")
get_ids(sp, "itis_test") # use "itis_test" test data for example only 

taxalight documentation built on Sept. 14, 2021, 5:15 p.m.