Load Brazilian Fauna database
load_faunabr(data_dir, data_version = "latest",
type = "short", verbose = TRUE, encoding = "UTF-8")
(character) the same directory used to save the data downloaded from Brazilian Fauna using the get_faunabr function.
(character) the version of Brazilian Fauna database to be loaded. It can be "latest", which will load the latest version available; or another specified version, for example "1.2". Default = "latest".
(character) it determines the number of columns that will be loaded. It can be "short" or "complete". Default = "short". See details.
(logical) Whether to display messages during function execution. Set to TRUE to enable display, or FALSE to run silently. Default = TRUE.
(character) the declared encodings for special characters. Character strings in R can be declared to be encoded in "latin1" or "UTF-8". Default: "UTF-8".
A data.frame with the specified version (Default is the latest available) of the Brazilian Fauna database. This data.frame is necessary to run most of the functions of the package.
The parameter type accepts two arguments. If type = short, it will load a data.frame with the 20 columns needed to run the other functions of the package: species, subspecies, scientificName, validName, kingdom, phylum, class, order, family, genus, lifeForm, habitat, states, countryCode, origin, taxonomicStatus, nomenclaturalStatus, vernacularName, and taxonRank. If type = complete, it will load a data.frame with all 31 variables available in Brazilian Fauna database.
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
if (FALSE) { # \dontrun{
#Creating a folder in a temporary directory
#Replace 'file.path(tempdir(), "faunabr")' by a path folder to be create in
#your computer
my_dir <- file.path(file.path(tempdir(), "faunabr"))
dir.create(my_dir)
#Download, merge and save data
get_fauna(output_dir = my_dir, data_version = "latest", overwrite = TRUE,
verbose = TRUE)
#Load data
df <- load_faunabr(data_dir = my_dir, data_version = "latest",
type = "short")
} # }