Running ‘testthat.R’ [16s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(CohortSurvival)
  > 
  > test_check("CohortSurvival")
  Starting 2 test processes
  [ FAIL 2 | WARN 0 | SKIP 42 | PASS 0 ]
  
  ══ Skipped tests (42) ══════════════════════════════════════════════════════════
  • On CRAN (42): 'test-benchmarkCohortSurvival.R:2:3',
    'test-benchmarkCohortSurvival.R:61:3', 'test-addCohortSurvival.R:43:3',
    'test-addCohortSurvival.R:149:3', 'test-addCohortSurvival.R:235:3',
    'test-addCohortSurvival.R:314:3', 'test-addCohortSurvival.R:399:3',
    'test-addCohortSurvival.R:479:3', 'test-addCohortSurvival.R:491:3',
    'test-addCohortSurvival.R:564:3', 'test-addCohortSurvival.R:623:3',
    'test-generateDeathCohort.R:2:3', 'test-generateDeathCohort.R:29:3',
    'test-generateDeathCohort.R:61:3', 'test-generateDeathCohort.R:104:3',
    'test-generateDeathCohort.R:132:3', 'test-generateDeathCohort.R:184:3',
    'test-generateDeathCohort.R:223:3', 'test-mockMGUS2cdm.R:2:3',
    'test-plotSurvival.R:2:3', 'test-plotSurvival.R:20:3',
    'test-plotSurvival.R:38:3', 'test-plotSurvival.R:58:3',
    'test-plotSurvival.R:78:3', 'test-plotSurvival.R:99:3',
    'test-plotSurvival.R:117:3', 'test-plotSurvival.R:137:3',
    'test-survivalSummary.R:2:3', 'test-estimateSurvival.R:104:3',
    'test-estimateSurvival.R:148:3', 'test-estimateSurvival.R:202:3',
    'test-estimateSurvival.R:345:3', 'test-estimateSurvival.R:531:3',
    'test-estimateSurvival.R:913:3', 'test-estimateSurvival.R:1010:3',
    'test-estimateSurvival.R:1028:3', 'test-estimateSurvival.R:1061:3',
    'test-estimateSurvival.R:1110:3', 'test-estimateSurvival.R:1277:3',
    'test-estimateSurvival.R:1375:3', 'test-estimateSurvival.R:1403:3',
    'test-estimateSurvival.R:1422:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-addCohortSurvival.R:22:3'): working example ────────────────────
  Error in `(function (cond) 
  .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = "there is no package called 'duckdb'", 
      call = loadNamespace(x), package = "duckdb", lib.loc = NULL), class = c("packageNotFoundError", 
  "error", "condition")))`: error in evaluating the argument 'drv' in selecting a method for function 'dbConnect': there is no package called 'duckdb'
  Backtrace:
      ▆
   1. ├─PatientProfiles::mockPatientProfiles(cohort1 = cohort, observation_period = observation_period) at test-addCohortSurvival.R:22:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   3. ├─base::loadNamespace(x)
   4. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   5. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   6. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   7. │ └─base::stop(cond)
   8. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-estimateSurvival.R:8:3'): mgus example: no Competing risk ──────
  Error in `(function (cond) 
  .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = "there is no package called 'duckdb'", 
      call = loadNamespace(x), package = "duckdb", lib.loc = NULL), class = c("packageNotFoundError", 
  "error", "condition")))`: error in evaluating the argument 'drv' in selecting a method for function 'dbConnect': there is no package called 'duckdb'
  Backtrace:
      ▆
   1. ├─CohortSurvival::mockMGUS2cdm() at test-estimateSurvival.R:8:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   3. ├─base::loadNamespace(x)
   4. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   5. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   6. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   7. │ └─base::stop(cond)
   8. └─base (local) `<fn>`(`<pckgNtFE>`)
  
  [ FAIL 2 | WARN 0 | SKIP 42 | PASS 0 ]
  Error: Test failures
  Execution halted