Skip to contents

This function retrieves vernacular (common) names for a given species using IUCN data. It filters vernacular names based on matching core_id and merges them with species metadata.

Usage

get_vernacular_name(species)

Arguments

species

A character vector containing the scientific names of species for which vernacular names are to be retrieved.

Value

A data.table or data.frame with columns:

submitted_name

The scientific name of the species as submitted.

vernacular_names

A character string that contains the concatenated vernacular names for each species, separated by " - ".

Details

The function first retrieves IUCN data for the input species and extracts the corresponding core_id. It then filters the vernacular name dataset using the core_id and concatenates all unique vernacular names for each species. The resulting data includes the submitted species name along with the corresponding vernacular names.

Examples

if (FALSE) { # \dontrun{
# Example of retrieving vernacular names for two species
species <- c("Panthera uncia", "Cedrela odorata")
result <- get_vernacular_name(species)
print(result)
} # }