taxadb (version 0.2.1)

get_names: get_names

Description

Translate identifiers into scientific names

Usage

get_names(
  id,
  provider = getOption("taxadb_default_provider", "itis"),
  version = latest_version(),
  format = c("guess", "prefix", "bare", "uri"),
  taxadb_db = td_connect(),
  db = NULL
)

Value

a vector of names, of the same length as the input ids. Any unmatched IDs will return as NAs.

Arguments

id

a list of taxonomic identifiers.

provider

abbreviation code for the provider. See details.

version

Which version of the taxadb provider database should we use? defaults to latest. see [avialable_releases()] for details.

format

Format for the returned identifier, one of

  • prefix (e.g. NCBI:9606, the default), or

  • bare (e.g. 9606, used in taxize::get_ids()),

  • uri (e.g. http://ncbi.nlm.nih.gov/taxonomy/9606).

taxadb_db

Connection to from [td_connect()].

db

previous name for provider argument, now deprecated

Details

Like all taxadb functions, this function will run fastest if a local copy of the provider is installed in advance using [td_create()].

See Also

Other get: get_ids()

Examples

Run this code
# \donttest{

# \dontshow{
   ## All examples use a temporary directory
   Sys.setenv(TAXADB_HOME = file.path(tempdir(), "taxadb"))
   options("taxadb_default_provider"="itis_test")
  # }

get_names(c("ITIS:1025094", "ITIS:1025103"), format = "prefix")

# }

Run the code above in your browser using DataLab