tests/test_download.R

library("stanza")

#
# testing_levels = c("minimal" = 1L, default" = 2L, "download" = 3L, "install" = 4L, "all" = 5L)
#
CLEANUP <- as.logical(Sys.getenv("STANZA_TEST_CLEANUP", FALSE))
if ((stanza_options("testing_level") >= 3L) && CLEANUP) {
    for (model_dir in dir("~", pattern = "stanza_resources", full.names = TRUE)) {
        unlink(model_dir, recursive = TRUE)
    }
}


if (stanza_options("testing_level") >= 3L) {
    stanza_initialize()
    stanza_options("model_dir")
    stanza_download()
}

Try the stanza package in your browser

Any scripts or data that you put into this service are public.

stanza documentation built on June 8, 2025, 1:23 p.m.