tests/testthat/setup-gold.R

if (!exists("gold_runs")) {
  if (!testthat:::on_cran() & identical(Sys.getenv("TEST_VDIFFR"), "true")) {
    # load gold runs, possibly from cache
    .mc_options <- default_sampling()
    gold_runs <- load_gold(TRUE)
    options(.mc_options)
  } else {
    # load gold runs, use cache if available, but do short
    # sampling if not
    if (identical(Sys.getenv("NOT_CRAN"), "true")) {
      .mc_options <- very_fast_sampling()
    } else {
      .mc_options <- fake_sampling()
    }
    gold_runs <- load_gold(TRUE)
    options(.mc_options)
  }
}

Try the OncoBayes2 package in your browser

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

OncoBayes2 documentation built on June 8, 2025, 1:10 p.m.