Function to check species scientific name in Brazilian Flora 2020 database

check_flora(species, get_synonyms = TRUE, infraspecies = FALSE)

Arguments

species

Character. A species scientific name without authors, ideally already passed by the string check in `Rocc::check_status()`. Accepts only one name at a time. Use `lapply()` or functions from `purrr` package to run for multiple species

get_synonyms

Logical. If `get_synonyms = TRUE` (default) returns a second element containing information of all synonyms a species has

infraspecies

Logical. If `infraspecies = TRUE` returns accepted name of any infraspecies classification

Value

A list with one or two elements. If `get_synonyms = TRUE` the second element of the list contains the names and additional information of synonyms or a `NULL` object if the species has no synonyms.

Author

Sara Mortara & Andrea Sánchez-Tapia

Examples

# single species check_flora("Dalbergia nigra")
#> [1] "Flora 2020 API is out of service"
# more than one species w/ lapply from base lapply(c("Dalbergia nigra", "Aspidosperma discolor"), check_flora)
#> [1] "Flora 2020 API is out of service" #> [1] "Flora 2020 API is out of service"
#> [[1]] #> NULL #> #> [[2]] #> NULL #>