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

tax_rank

Get rank for a given taxonomic name.


Description

Get rank for a given taxonomic name.

Usage

tax_rank(sci_id, db = NULL, rows = NA, x = NULL, ...)

Arguments

sci_id

(character) Vector of one or more taxon names (character) or IDs (character or numeric) to query. Or objects returned from get_*() functions like get_tsn()

db

(character) database to query. either ncbi, itis, eol, tropicos, gbif,nbn, worms, natserv, bold. Note that each taxonomic data source has their own identifiers, so that if you provide the wrong db value for the identifier you may get a result, but it will likely be wrong (not what you were expecting). If using ncbi we recommend getting an API key; see taxize-authentication

rows

numeric; Any number from 1 to infinity. If the default NA, all rows are considered. passed down to get_*() functions.

x

Deprecated, see sci_id

...

Additional arguments to classification()

Value

A named list of character vectors with ranks (all lower-cased)

Note

While tax_name() returns the name of a specified rank, tax_rank() returns the actual rank of the taxon.

See Also

Examples

## Not run: 
tax_rank("Helianthus annuus", db = "itis")
tax_rank("Helianthus annuus", db = "natserv")
tax_rank(get_tsn("Helianthus annuus"))
tax_rank(c("Helianthus", "Pinus", "Poa"), db = "itis")

tax_rank(get_boldid("Helianthus annuus"))
tax_rank("421377", db = "bold")
tax_rank(421377, db = "bold")

tax_rank(c("Plantae", "Helianthus annuus",
  "Puma", "Homo sapiens"), db = 'itis')
tax_rank(c("Helianthus annuus", "Quercus", "Fabaceae"), db = 'tropicos')

tax_rank(names_list("species"), db = 'gbif')
tax_rank(names_list("family"), db = 'gbif')

tax_rank(c("Gadus morhua", "Lichenopora neapolitana"),
  db = "worms")

## 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.