copy_kirby21_data {kirby21.base} | R Documentation |
Copy Kirby21 Data to an output directory
Description
Copies files from Kirby21 Package to an output directory
Usage
copy_kirby21_data(copydir, ...)
Arguments
copydir |
Output directory for data |
... |
Arguments to pass to |
Value
Logical if files are copied
Examples
on_cran = !identical(Sys.getenv("NOT_CRAN"), "true")
on_ci <- nzchar(Sys.getenv("CI"))
local_run = grepl("musch", tolower(Sys.info()[["user"]]))
run_example = !on_cran || on_ci || local_run
if (run_example) {
tdir = tempfile()
dir.create(tdir)
outdir = tempdir()
surv_installed = "kirby21.survey" %in% installed.packages()
if (!surv_installed) {
testthat::expect_error(
download_kirby21_data("SURVEY",
force = FALSE))
} else {
download_kirby21_data("SURVEY",
force = FALSE)
}
res = download_kirby21_data("SURVEY", outdir = outdir, force = TRUE)
if (!surv_installed) {
try({remove.packages("kirby21.survey")})
}
copy_kirby21_data(copydir = tdir, outdir = outdir)
}
[Package kirby21.base version 1.7.3 Index]