
Download one or more soilKey lazy-fetch caches from GitHub Release
Source:R/extdata-lazy-fetch.R
download_extdata_cache.RdsoilKey ships four large benchmark caches (KSSL, KSSL+NASIS, AfSP,
WoSIS stratified) that are too large to embed in the CRAN source
tarball. Since v0.9.94 they are pinned to a versioned GitHub Release
and downloaded on demand into the user cache directory at
tools::R_user_dir("soilKey", "data").
Usage
download_extdata_cache(
which = "all",
release = .SOILKEY_LAZY_FETCH_RELEASE,
overwrite = FALSE,
verbose = TRUE
)Arguments
- which
Character vector of cache names to download.
"all"(default) downloads every lazy-fetch cache. Valid names:"afsp_sample","kssl_sample","kssl_nasis_sample","wosis_stratified_sample".- release
GitHub Release tag to pull from (default
"v0.9.94-data"). Override only if you maintain a local mirror.- overwrite
If
TRUE, redownload even if the file is already present in the user cache (defaultFALSE).- verbose
Print progress (default
TRUE).
Details
On first call to any of load_kssl_sample(),
load_kssl_nasis_sample(), load_afsp_sample(), or
load_wosis_stratified_sample(), soilKey checks for the file
in the user cache. If missing, the loader prompts (interactive
sessions only) to download. Use download_extdata_cache()
to eagerly populate the cache without prompting.