Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

id2name

Taxonomic IDs to taxonomic names


Description

Taxonomic IDs to taxonomic names

Usage

id2name(id, db = NULL, x = NULL, ...)

## Default S3 method:
id2name(id, db = NULL, x = NULL, ...)

## S3 method for class 'tolid'
id2name(id, ...)

## S3 method for class 'tsn'
id2name(id, ...)

## S3 method for class 'uid'
id2name(id, ...)

## S3 method for class 'wormsid'
id2name(id, ...)

## S3 method for class 'gbifid'
id2name(id, ...)

## S3 method for class 'boldid'
id2name(id, ...)

Arguments

id

vector of taxonomic IDs (character or numeric)

db

(character) database to query. One or more of tol, itis, ncbi, worms, gbif, or bold. Note that each taxonomic data source has their own identifiers, so that if you provide the wrong db value for the identifier you could get a result, but it will likely be wrong (not what you were expecting). If using ncbi we recommend getting API keys; see taxize-authentication

x

Deprecated, see id

...

Further args passed on to tol_id2name or itis_getrecord, or other internal functions. See those functions for what parameters can be passed on.

Value

A named list of data.frames, named by the input taxonomic ids

HTTP version for NCBI requests

We hard code http_version = 2L to use HTTP/1.1 in HTTP requests to the Entrez API. See curl::curl_symbols('CURL_HTTP_VERSION')

Examples

## Not run: 
# ITIS
id2name(19322, db = "itis")

# TOL
id2name(515698, db = "tol")
# get NCBI ID and pass to classification()
x <- id2name(515698, db = "tol")
classification(as.uid(x[[1]]$tax_sources_ncbi))

# NCBI
id2name(315567, db = "ncbi")
id2name(3339, db = "ncbi")
id2name(9696, db = "ncbi")
id2name(c(9695, 9696), db = "ncbi")

# WORMS
id2name(105706, db = "worms")

# GBIF
id2name(2441176, db = "gbif")

# BOLD
id2name(88899, db = "bold")

## End(Not run)

taxize

Taxonomic Information from Around the Web

v0.9.100
MIT + file LICENSE
Authors
Scott Chamberlain [aut] (<https://orcid.org/0000-0003-1444-9135>), Eduard Szoecs [aut], Zachary Foster [aut, cre], Zebulun Arendsee [aut], Carl Boettiger [ctb], Karthik Ram [ctb], Ignasi Bartomeus [ctb], John Baumgartner [ctb], James O'Donnell [ctb], Jari Oksanen [ctb], Bastian Greshake Tzovaras [ctb], Philippe Marchand [ctb], Vinh Tran [ctb], Maëlle Salmon [ctb], Gaopeng Li [ctb], Matthias Grenié [ctb], rOpenSci [fnd] (https://ropensci.org/)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.