Downloads example datasets that can be used to test the functionality of the metabodecon package. These datasets are not included in the package by default due to size constraints. The datasets are downloaded as zip file and extracted automatically, unless extraction is disabled by the user.
Usage
download_example_datasets(
dst_dir = NULL,
extract = TRUE,
persistent = NULL,
overwrite = FALSE,
silent = FALSE
)
Arguments
- dst_dir
The destination directory where the downloaded datasets will be stored. If NULL, the function will return the path to the cached zip file.
- extract
Logical. If TRUE, the downloaded zip file will be extracted.
- persistent
Logical. If TRUE, the downloaded datasets will be cached at
datadir_persistent()
to speed up future calls todownload_example_datasets()
. If FALSE, the datasets will be cached atdatadir_temp()
. If NULL, the function will check both paths for the cached datasets but will returndatadir_temp()
if the cached file does not yet exist.- overwrite
Logical. If TRUE, existing files with the same name in the destination directory will be overwritten.
- silent
Logical. If TRUE, no output will be printed to the console.
Examples
if (interactive()) {
zip <- download_example_datasets(extract = FALSE, persistent = FALSE)
dir <- download_example_datasets(extract = TRUE)
}