Download and unpack configured external CraftGRN demo data
Source:R/utils_demo_data.R
download_craftgrn_demo_data.RdDownloads a processed demo data archive from a configured external source, verifies its MD5 checksum by default, extracts it, and returns the extracted project directory. Demo bundles are external to the R package so package installation remains small and CRAN-friendly. No external demo bundle is currently configured.
Usage
download_craftgrn_demo_data(
destdir = ".",
demo = NULL,
overwrite = FALSE,
checksum = TRUE,
verbose = TRUE
)Arguments
- destdir
Directory where the archive should be downloaded and unpacked.
- demo
Optional demo bundle name. No external demo bundle is currently configured.
- overwrite
Logical; if `TRUE`, download the archive again and replace an existing extracted project directory.
- checksum
Logical; if `TRUE`, verify the downloaded archive MD5.
- verbose
Logical; if `TRUE`, emit concise status messages.
Details
If the download fails, inspect `craftgrn_demo_data_info()` and download the configured asset manually. If checksum verification fails, rerun with `overwrite = TRUE` to replace a stale or partial archive. The extracted project uses `base_dir: "."`, so pass the returned directory or its project config path directly to package functions after moving the folder.
Examples
craftgrn_demo_data_info()
#> # A tibble: 0 × 10
#> # ℹ 10 variables: name <chr>, title <chr>, version <chr>,
#> # release_tag <chr>, file <chr>, project_dir <chr>, url <chr>,
#> # md5 <chr>, size <chr>, description <chr>