
Get Taxonomy Information Including Genus, Family and Order
get_taxonomy_info.RdThis function returns the genus, family, order
for each species in the input vector. It queries multiple sources (e.g., GBIF, ITIS, FishBase, COL, NCBI)
to retrieve the taxonomic information.
If all_categories is set to TRUE, it will return all available taxonomic ranks.
Usage
get_taxonomy_info(
species,
all_categories = FALSE,
sources = c("gbif", "itis", "ncbi")
)Arguments
- species
Vector of species names (scientific names) as input.
- all_categories
Logical, if TRUE, retrieves all taxonomic categories available. Default is FALSE.
- sources
Character vector, the taxonomy sources to query. Options include "gbif", "itis", "ncbi", "col", "eol", "tropicos", "wikidata", "ott", "nbnc", "fishbase". Default is
c("gbif", "itis", "ncbi").
Value
A data frame with taxonomic categories including species, year, author, genus, family, and order.
Examples
if (FALSE) { # \dontrun{
# Example with a single species using multiple sources
get_taxonomy_info(c("Panthera leo"), sources = c("gbif", "itis"))
# Example with fish species using FishBase
get_taxonomy_info(c("Salmo salar", "Oncorhynchus mykiss"), sources = "fishbase")
# Example with multiple species and all categories
get_taxonomy_info(c("Panthera leo", "Homo sapiens"), all_categories = TRUE)
} # }