Learn R Programming

taxize (version 0.0.6)

classification: Retrieve the taxonomic hierarchy for a given taxon ID.

Description

Retrieve the taxonomic hierarchy for a given taxon ID.

Usage

classification(...)

## S3 method for class 'default': classification(x, db = NULL, ...)

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

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

Arguments

x
character; taxons to query.
db
character; database to query. either ncbi or itis.
id
character; identifiers, returned by get_tsn or get_uid
...
Other passed arguments.

Value

  • A named list of data.frames with the taxonomic classifcation of every supplied taxa.

See Also

get_tsn, get_uid

Examples

Run this code
# Plug in taxon names directly
classification(c("Chironomus riparius", "aaa vva"), db = 'ncbi')
classification(c("Chironomus riparius", "aaa vva"), db = 'itis')

# Use methods for get_uid and get_tsn
classification(get_uid(c("Chironomus riparius", "aaa vva")))
classification(get_tsn(c("Chironomus riparius", "aaa vva")))

Run the code above in your browser using DataLab