Learn R Programming

taxize (version 0.9.4)

tax_rank: Get rank for a given taxonomic name.

Description

Get rank for a given taxonomic name.

Usage

tax_rank(x, db = NULL, ...)

Arguments

x

(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, col, 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).

...

Additional arguments to classification

Value

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

See Also

classification, tax_name

Examples

Run this code
# NOT RUN {
tax_rank(x = "Helianthus annuus", db = "itis")
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("Platanista gangetica", "Lichenopora neapolitana"),
  db = "worms")
# }

Run the code above in your browser using DataLab