Running 'testthat.R' [159s]
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(DrugUtilisation)
  > 
  > test_check("DrugUtilisation")
  Starting 2 test processes
  [ FAIL 6 | WARN 0 | SKIP 43 | PASS 110 ]
  
  ══ Skipped tests (43) ══════════════════════════════════════════════════════════
  • On CRAN (43): 'test-benchmarkDrugUtilisation.R:2:3', 'test-dailyDose.R:2:3',
    'test-addDrugUtilisation.R:3:3', 'test-addDrugUtilisation.R:162:3',
    'test-addDrugUtilisation.R:202:3', 'test-generatedAtcCohortSet.R:2:3',
    'test-generatedIngredientCohortSet.R:2:3',
    'test-generatedIngredientCohortSet.R:32:3',
    'test-generatedIngredientCohortSet.R:49:3',
    'test-generatedIngredientCohortSet.R:64:3',
    'test-generatedIngredientCohortSet.R:93:3',
    'test-generateDrugUtilisationCohortSet.R:2:3',
    'test-generateDrugUtilisationCohortSet.R:23:3',
    'test-generateDrugUtilisationCohortSet.R:209:3', 'test-patterns.R:2:3',
    'test-plotProportionOfPatientsCovered.R:2:3',
    'test-plotProportionOfPatientsCovered.R:53:3',
    'test-plotProportionOfPatientsCovered.R:95:3', 'test-plotTreatment.R:2:3',
    'test-plots.R:2:3', 'test-plots.R:93:3', 'test-plots.R:157:3',
    'test-require.R:2:3', 'test-require.R:108:3', 'test-require.R:313:3',
    'test-require.R:419:3', 'test-require.R:513:3', 'test-require.R:584:3',
    'test-indication.R:2:3', 'test-indication.R:201:3',
    'test-indication.R:366:3', 'test-indication.R:483:3',
    'test-summariseProportionOfPatientsCovered.R:94:3',
    'test-summariseProportionOfPatientsCovered.R:170:3',
    'test-summariseProportionOfPatientsCovered.R:277:3',
    'test-summariseProportionOfPatientsCovered.R:499:3',
    'test-summariseProportionOfPatientsCovered.R:552:3', 'test-tables.R:2:3',
    'test-tables.R:97:3', 'test-tables.R:222:3', 'test-tables.R:306:3',
    'test-tables.R:398:3', 'test-tables.R:457:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-generateDrugUtilisationCohortSet.R:142:3'): cohort attrition ──
  any(...) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  ── Failure ('test-generateDrugUtilisationCohortSet.R:166:3'): cohort attrition ──
  colnames(cdm$cohort2) (`actual`) not identical to c(omopgenerics::cohortColumns("cohort"), "number_exposures") (`expected`).
  
      actual              | expected               
  [3] "cohort_start_date" | "cohort_start_date" [3]
  [4] "cohort_end_date"   | "cohort_end_date"   [4]
  [5] "number_exposures"  | "number_exposures"  [5]
  [6] "days_prescribed"   -                        
  ── Failure ('test-generateDrugUtilisationCohortSet.R:177:3'): cohort attrition ──
  colnames(cdm$cohort3) (`actual`) not identical to c(omopgenerics::cohortColumns("cohort"), "days_prescribed") (`expected`).
  
      actual              | expected               
  [2] "subject_id"        | "subject_id"        [2]
  [3] "cohort_start_date" | "cohort_start_date" [3]
  [4] "cohort_end_date"   | "cohort_end_date"   [4]
  [5] "number_exposures"  -                        
  [6] "days_prescribed"   | "days_prescribed"   [5]
  ── Failure ('test-generateDrugUtilisationCohortSet.R:188:3'): cohort attrition ──
  colnames(cdm$cohort4) (`actual`) not identical to omopgenerics::cohortColumns("cohort") (`expected`).
  
      actual              | expected               
  [2] "subject_id"        | "subject_id"        [2]
  [3] "cohort_start_date" | "cohort_start_date" [3]
  [4] "cohort_end_date"   | "cohort_end_date"   [4]
  [5] "number_exposures"  -                        
  [6] "days_prescribed"   -                        
  ── Failure ('test-generateDrugUtilisationCohortSet.R:202:3'): cohort attrition ──
  cohort1$number_exposures (`actual`) not identical to c(4L, 1L, 1L) (`expected`).
  
    `actual`:      
  `expected`: 4 1 1
  ── Failure ('test-generateDrugUtilisationCohortSet.R:203:3'): cohort attrition ──
  cohort1$days_prescribed (`actual`) not identical to c(134L, 46L, 24L) (`expected`).
  
    `actual`:          
  `expected`: 134 46 24
  
  [ FAIL 6 | WARN 0 | SKIP 43 | PASS 110 ]
  Error: Test failures
  Execution halted