Running ‘testthat.R’ [128s/188s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(heemod)
  > 
  > ## the Sys.setenv fixes a problem running tests
  > ##   with parallel processing; related to
  > ##   https://github.com/hadley/testthat/issues/86 and
  > ##   https://github.com/hadley/testthat/issues/144
  > 
  > Sys.setenv("R_TESTS" = "")
  > test_check("heemod")
  Failed with error:  'there is no package called 'diagram''
  Failed with error:  'there is no package called 'flexsurv''
  [ FAIL 3 | WARN 6 | SKIP 1 | PASS 377 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • empty test (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_matrix.R:78:5): Functions on matrix objects ─────────────────────
  Error in `plot.uneval_matrix(mat1)`: 'diagram' package required for transition plot.
  Backtrace:
      ▆
   1. ├─base::plot(mat1) at test_matrix.R:78:4
   2. └─heemod:::plot.uneval_matrix(mat1)
  ── Error (test_part_surv.R:56:1): (code run outside of `test_that()`) ──────────
  Error in `eval_surv.surv_dist(x$dist1, time = time, ...)`: 'flexsurv' package required.
  Backtrace:
       ▆
    1. ├─base::suppressMessages(...) at test_part_surv.R:56:0
    2. │ └─base::withCallingHandlers(...)
    3. └─heemod::run_model(...)
    4.   └─heemod::run_model_(...)
    5.     └─heemod:::eval_strategy(...)
    6.       ├─heemod:::eval_transition(uneval_transition, parameters)
    7.       └─heemod:::eval_transition.part_surv(uneval_transition, parameters)
    8.         ├─heemod::compute_surv(...)
    9.         │ ├─base::withVisible(eval(mc, parent.frame()))
   10.         │ └─base::eval(mc, parent.frame())
   11.         │   └─base::eval(mc, parent.frame())
   12.         └─heemod `<fn>`(...)
   13.           ├─heemod:::eval_surv(x, cycle_length * time_, ...)
   14.           └─heemod:::eval_surv.surv_projection(x, cycle_length * time_, ...)
   15.             ├─heemod:::eval_surv(x$dist1, time = time, ...)
   16.             └─heemod:::eval_surv.surv_dist(x$dist1, time = time, ...)
  ── Error (test_surv_eval.R:3:1): (code run outside of `test_that()`) ───────────
  <packageNotFoundError/error/condition>
  Error in `loadNamespace(x)`: there is no package called 'flexsurv'
  Backtrace:
      ▆
   1. └─base::loadNamespace(x) at test_surv_eval.R:3:0
   2.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   3.     └─base withOneRestart(expr, restarts[[1L]])
   4.       └─base doWithOneRestart(return(expr), restart)
  
  [ FAIL 3 | WARN 6 | SKIP 1 | PASS 377 ]
  Error: Test failures
  Execution halted