taxize (version 0.1.5)

tax_name: Get taxonomic names for a given rank.

Description

Retrieve name of querried taxonomic rank of a taxon.

Usage

tax_name(query = NULL, get = NULL, db = "itis",
    pref = "ncbi", verbose = TRUE, ...)

Arguments

query
character; Vector of taxonomic names to query.
get
character; The ranks of the taxonomic name to get, see rank_ref.
db
character; The database to search from: 'itis', 'ncbi' or 'both'. If 'both' both NCBI and ITIS will be queried. Result will be the union of both.
pref
character; If db = 'both', sets the preference for the union. Either 'ncbi' or 'itis'. Currently not implemented - preference is given to ncbi.
verbose
logical; If TRUE the actual taxon queried is printed on the console.
...
Other arguments passed to get_tsn or get_uid.

Value

  • A data.frame with one column for every queried rank.

See Also

classification

Examples

Run this code
# A case where itis and ncbi use the same names
tax_name(query = "Helianthus annuus", get = "family", db = "itis")
tax_name(query = "Helianthus annuus", get = "family", db = "ncbi")

# Case where itis and ncbi use different names
tax_name(query = "Helianthus annuus", get = "kingdom", db = "itis")
tax_name(query = "Helianthus annuus", get = "kingdom", db = "ncbi")

# multiple get arguments
tax_name(query = c("Helianthus annuus","Baetis rhodani"), get = c("genus",
"kingdom"), db = "ncbi")
tax_name(query = "xxx", get = c("genus", "kingdom"), db = "itis")

# query both
tax_name(query=c("Helianthus annuus", 'Baetis rhodani'), get=c("genus",
"kingdom"), db="both")

Run the code above in your browser using DataCamp Workspace