Running ‘testthat.R’ [11s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(DrugExposureDiagnostics)
  > 
  > test_check("DrugExposureDiagnostics")
  trying URL 'https://example-data.ohdsi.dev/GiBleed.zip'
  Content type 'application/zip' length 6754786 bytes (6.4 MB)
  ==================================================
  downloaded 6.4 MB
  
  Joining with `by = join_by(ingredient_concept_id)`
  Joining with `by = join_by(ingredient_concept_id)`
  Joining with `by = join_by(ingredient_concept_id)`
  Time taken: 0 minutes and 0 seconds
  testMessage
  [ FAIL 38 | WARN 5 | SKIP 1 | PASS 146 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • Sys.getenv("TESTDB_USER") == "" is TRUE (1): 'test-SyntheaSqlServer.R:5:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-CheckDrugSig.R:15:3'): checkDrugSig overall ────────────────────
  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. ├─DrugExposureDiagnostics (local) getTestData() at test-CheckDrugSig.R:15:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckDrugSig.R:11:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-CheckDrugSig.R:29:3'): checkDrugSig byConcept ──────────────────
  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. ├─DrugExposureDiagnostics (local) getTestData() at test-CheckDrugSig.R:29:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckDrugSig.R:11:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-CheckVerbatimEndDate.R:22:3'): checkVerbatimEndDate overall ────
  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. ├─DrugExposureDiagnostics (local) getTestData() at test-CheckVerbatimEndDate.R:22:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckVerbatimEndDate.R:18:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-CheckVerbatimEndDate.R:34:3'): checkVerbatimEndDate byConcept ──
  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. ├─DrugExposureDiagnostics (local) getTestData() at test-CheckVerbatimEndDate.R:34:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-CheckVerbatimEndDate.R:18:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-DrugRecordChecks.R:42:3'): summariseDrugExposureDuration test ──
  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. ├─DrugExposureDiagnostics (local) getTestData() at test-DrugRecordChecks.R:42:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-DrugRecordChecks.R:37:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-Eunomia.R:3:3'): execute default checks, default ingredient, verbose ──
  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. ├─DrugExposureDiagnostics::getEunomiaCdm() at test-Eunomia.R:3:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:23:3'): execute all checks, given ingredient ─────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:23:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:41:3'): execute some checks, given ingredient ────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:41:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:57:3'): execute all checks: expected errors ──────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:57:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:68:3'): each check ───────────────────────────────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:68:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:106:3'): each check: expected errors ─────────────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:106:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:131:3'): get number of Days_supply that are incorrect ──
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:131:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:147:3'): sampling ────────────────────────────────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:147:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:167:3'): summary ─────────────────────────────────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:167:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:185:3'): subset on specific concepts ─────────────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:185:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-Eunomia.R:211:3'): obscuring results by minCellCount ───────────
  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. ├─DrugExposureDiagnostics::getEunomiaCdm(1125315) at test-Eunomia.R:211:3
   2. │ └─DBI::dbConnect(duckdb::duckdb(), dbdir = CDMConnector::eunomia_dir())
   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-GetDrugMissings.R:41:3'): getDrugMissings overall ──────────────
  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. ├─DrugExposureDiagnostics (local) getTestData() at test-GetDrugMissings.R:41:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-GetDrugMissings.R:37:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-GetDrugMissings.R:55:3'): getDrugMissings byConcept ────────────
  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. ├─DrugExposureDiagnostics (local) getTestData() at test-GetDrugMissings.R:55:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-GetDrugMissings.R:37:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-GetDrugRecords.R:50:3'): getDrugRecords ────────────────────────
  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. ├─DrugExposureDiagnostics (local) getTestData(ingredientId) at test-GetDrugRecords.R:50:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-GetDrugRecords.R:43:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-GetDrugRecords.R:73:3'): getDrugRecords invalid inputs ─────────
  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. ├─DrugExposureDiagnostics (local) getTestData(ingredientId) at test-GetDrugRecords.R:73:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-GetDrugRecords.R:43:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-IngredientOverview.R:34:3'): getIngredientOverview ─────────────
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:34:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-IngredientOverview.R:54:3'): getIngredientOverview error cases ──
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:54:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-IngredientOverview.R:64:3'): getIngredientsPresence ────────────
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:64:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-IngredientOverview.R:83:3'): getIngredientsPresence error cases ──
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-IngredientOverview.R:83:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(...) at test-IngredientOverview.R:28:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-MockDrugExposureData.R:2:3'): check working example with defaults ──
  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. ├─DrugExposureDiagnostics:::mockDrugExposure() at test-MockDrugExposureData.R:2: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-MockDrugExposureData.R:112:3'): check working example with drug_strength ──
  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. ├─DrugExposureDiagnostics:::mockDrugExposure(drug_strength = drug_strength) at test-MockDrugExposureData.R:112: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-MockDrugExposureData.R:142:3'): check working example with drug drug_exposure ──
  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. ├─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-MockDrugExposureData.R:142: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-MockDrugExposureData.R:163:3'): check working example with drug_exposure options ──
  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. ├─DrugExposureDiagnostics:::mockDrugExposure(...) at test-MockDrugExposureData.R:163: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-MockDrugExposureData.R:174:3'): check working example with drug_strength options ──
  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. ├─DrugExposureDiagnostics:::mockDrugExposure(...) at test-MockDrugExposureData.R:174: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-SummariseQuantity.R:20:3'): check summary calculation ──────────
  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. ├─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-SummariseQuantity.R:20: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-checkDaysSupply.R:23:3'): check if it can detect missing ───────
  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. ├─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-checkDaysSupply.R:23: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-checkDaysSupply.R:68:3'): check if summarise days_supply works ──
  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. ├─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drug_exposure) at test-checkDaysSupply.R:68: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-checkDrugDose.R:25:3'): checkDrugDose overall ──────────────────
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-checkDrugDose.R:25:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure() at test-checkDrugDose.R:2:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-checkDrugDose.R:54:3'): checkDrugDose by Concept ───────────────
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-checkDrugDose.R:54:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure() at test-checkDrugDose.R:2:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-getHistogram.R:21:3'): test histogram plotting ─────────────────
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-getHistogram.R:21:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drugExposure) at test-getHistogram.R:16:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-getHistogram.R:31:3'): test save load fucntionality for histograms ──
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-getHistogram.R:31:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drugExposure) at test-getHistogram.R:16:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-getHistogram.R:39:3'): test NA input ───────────────────────────
  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. ├─DrugExposureDiagnostics (local) getInputDb() at test-getHistogram.R:39:3
   2. │ └─DrugExposureDiagnostics:::mockDrugExposure(drug_exposure = drugExposure) at test-getHistogram.R:16:3
   3. │   └─DBI::dbConnect(duckdb::duckdb(), ":memory:")
   4. ├─base::loadNamespace(x)
   5. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   6. │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
   7. │ │   └─base (local) doWithOneRestart(return(expr), restart)
   8. │ └─base::stop(cond)
   9. └─base (local) `<fn>`(`<pckgNtFE>`)
  ── Error ('test-utils.R:57:3'): checkIsIngredient ──────────────────────────────
  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. ├─DrugExposureDiagnostics:::mockDrugExposure() at test-utils.R:57: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 38 | WARN 5 | SKIP 1 | PASS 146 ]
  Error: Test failures
  Execution halted