R/merge_data.R
merge_data.RdReads, processes, and merges the core components of the Catálogo Taxonômico da Fauna do Brasil
merge_data(
path_data,
version_data,
solve_discrepancies = TRUE,
translate = TRUE,
encoding = "UTF-8",
verbose = TRUE
)(character) the base directory path where the downloaded data is stored.
(numeric) version of the Fauna do Brasil database downloaded.
(logical) wheter to resolve inconsistencies
between species and subspecies information. When set to TRUE (default),
species information is updated based on unique data from subspecies. For
example, if a subspecies occurs in a certain state, it implies that the
species also occurs in that state.
(logical) whether to translate the original dataset
("lifeForm", "origin", "habitat", and "taxonRank") from Portuguese to
English. Default is TRUE.
(character) The text string encoding to pass down to
data.table::fread(). Default is "UTF-8".
(logical) whether to display messages during function
execution. Set to TRUE to enable display, or FALSE to run silently. Default
is TRUE.
The final dataset is built dynamically and saved directly to the matching
data directory as a compressed Gzip file named "CompleteBrazilianFauna.gz".
if (FALSE) { # \dontrun{
merge_data(path_data = "data", version_data = "latest",
solve_discrepancies = TRUE, translate = FALSE, verbose = TRUE)
} # }