check_fauna_names checks if the species names are correct and searches for suggestions if the name is misspelled or not found in the Fauna do Brasil database
check_fauna_names(data, species, max_distance = 0.1,
include_subspecies = TRUE)
(data.frame) the data.frame imported with the
load_faunabr
function.
(character) names of the species to be checked.
(numeric) Maximum distance (as a fraction) allowed for
searching suggestions when the name is misspelled. It can be any value
between 0 and 1. The higher the value, the more suggestions are returned.
For more details, see agrep
. Default = 0.1.
whether include subspecies when checking names. Default = TRUE.
a data.frame with the following columns:
input_name: the species names informed in species argument
Spelling: indicates if the species name is Correct (a perfect match with a species name in the Flora e Funga do Brasil), Probably_incorrect (partial match), or Not_found (no match with any species).
Suggested name: If Spelling is Correct, it is the same as the input_name. If Spelling is Probably_correct, one or more suggested names are listed, found according to the maximum distance. If Spelling is "Not_found", the value is NA.
Distance: The integer Levenshtein edit distance. It represents the number of single-character edits (insertions, deletions, or substitutions) required to transform the input_name into the Suggested_name.
taxonomicStatus: the taxonomic status of the species name ("valid" or "synonym").
nomenclaturalStatus: the nomenclatural status of the species name. This information is not available for all species.
validName: If the species name is not valid or incorrect, the valid name of the specie. If the species name is valid and correct, the same as input_name and Suggested_name.
family: the family of the specie.
Brazilian Zoology Group. Catálogo Taxonômico da Fauna do Brasil. Available at: https://ipt.jbrj.gov.br/jbrj/resource?r=catalogo_taxonomico_da_fauna_do_brasil
data("fauna_data")
spp <- c("Pantera onça", "Mazama bororo", "Mazama jucunda",
"Araucaria angustifolia")
check_fauna_names(data = fauna_data, species = spp)
#> input_name Spelling Suggested_name Distance
#> 1 Mazama bororo Correct Mazama bororo 0
#> 2 Mazama jucunda Correct Mazama jucunda 0
#> 3 Pantera onça Probably_incorrect Panthera onca 2
#> 4 Araucaria angustifolia Not_found <NA> NA
#> taxonomicStatus nomenclaturalStatus validName family matches
#> 1 synonym <NA> Mazama jucunda Cervidae single
#> 2 valid <NA> Mazama jucunda Cervidae single
#> 3 valid <NA> Panthera onca Felidae single
#> 4 <NA> <NA> <NA> <NA> none