copy_kirby21_data: Copy Kirby21 Data to an output directory

Description Usage Arguments Value Examples

View source: R/copy_kirby21_data.R

Description

Copies files from Kirby21 Package to an output directory

Usage

1

Arguments

copydir

Output directory for data

...

Arguments to pass to get_image_filenames

Value

Logical if files are copied

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)
}

neuroconductor-devel/kirby21.base documentation built on April 30, 2021, 11:12 a.m.