Running ‘testthat.R’ [427s/320s]
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.
  > test-estimateSurvival.R: ==================>------------   60% | ETA:  2s
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-plotSurvival.R: ==================>------------   60% | ETA:  2s
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-plotSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-plotSurvival.R: Getting overall estimates
  > test-plotSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-plotSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-plotSurvival.R: Getting overall estimates
  > test-plotSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: ==================>------------   60% | ETA:  2s
  > test-plotSurvival.R: ==================>------------   60% | ETA:  2s
  > test-plotSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-plotSurvival.R: Getting overall estimates
  > test-plotSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_test_empty'
  > test-plotSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-plotSurvival.R: Getting overall estimates
  > test-plotSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  Saving _problems/test-plotSurvival-179.R
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression_fake_empty' and competing outcome cohort 'death_cohort'
  > test-reexports-omopgenerics.R: ========================>------   80% | ETA:  1s
  > test-reexports-omopgenerics.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-reexports-omopgenerics.R: Getting overall estimates
  > test-reexports-omopgenerics.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-reexports-omopgenerics.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: 
  > test-estimateSurvival.R: -- No results for competing risk analysis --------------------------------------
  > test-estimateSurvival.R: Competing risk variable must have three levels.Do you have at least 1
  > test-estimateSurvival.R: individual for:
  > test-estimateSurvival.R: * 1) censored without event,
  > test-estimateSurvival.R: * 2) censored at outcome event of intest, and
  > test-estimateSurvival.R: * 3) censored at outcome competing event?
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_test_empty'
  > test-estimateSurvival.R: 
  > test-estimateSurvival.R: -- No results for competing risk analysis --------------------------------------
  > test-estimateSurvival.R: Competing risk variable must have three levels.Do you have at least 1
  > test-estimateSurvival.R: individual for:
  > test-estimateSurvival.R: * 1) censored without event,
  > test-estimateSurvival.R: * 2) censored at outcome event of intest, and
  > test-estimateSurvival.R: * 3) censored at outcome competing event?
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression_fake_empty' and competing outcome cohort 'death_test_empty'
  > test-reexports-omopgenerics.R: Getting overall estimates
  > test-reexports-omopgenerics.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: 
  > test-estimateSurvival.R: -- No results for competing risk analysis --------------------------------------
  > test-estimateSurvival.R: Competing risk variable must have three levels.Do you have at least 1
  > test-estimateSurvival.R: individual for:
  > test-estimateSurvival.R: * 1) censored without event,
  > test-estimateSurvival.R: * 2) censored at outcome event of intest, and
  > test-estimateSurvival.R: * 3) censored at outcome competing event?
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: ==================>------------   60% | ETA:  2s
  > test-estimateSurvival.R: ========================>------   80% | ETA:  2s
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: ==================>------------   60% | ETA:  2s
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: ========================>------   80% | ETA:  1s
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: ========================>------   80% | ETA:  1s
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: `eventgap` eliminated from settings as all elements are NA.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: `eventgap` eliminated from settings as all elements are NA.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis_2020' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis_2020', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: ========================>------   80% | ETA:  1s
  > test-estimateSurvival.R: ========================>------   80% | ETA:  1s
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: ========================>------   80% | ETA:  1s
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis' and outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  > test-estimateSurvival.R: - Getting survival for target cohort 'mgus_diagnosis', outcome cohort 'progression' and competing outcome cohort 'death_cohort'
  > test-estimateSurvival.R: Getting overall estimates
  > test-estimateSurvival.R: `eventgap`, `outcome_washout`, `censor_on_cohort_exit`, `follow_up_days`, and `minimum_survival_days` casted to character.
  Saving _problems/test-estimateSurvival-2255.R
  [ FAIL 2 | WARN 8 | SKIP 56 | PASS 62 ]
  
  ══ Skipped tests (56) ══════════════════════════════════════════════════════════
  • On CRAN (56): 'test-asSurvivalResult.R:2:3', 'test-asSurvivalResult.R:19:3',
    'test-asSurvivalResult.R:54:3', 'test-asSurvivalResult.R:94:3',
    'test-asSurvivalResult.R:148:3', 'test-asSurvivalResult.R:203:3',
    'test-asSurvivalResult.R:246:3', 'test-asSurvivalResult.R:289:3',
    'test-asSurvivalResult.R:330:3', 'test-addCohortSurvival.R:2:3',
    'test-addCohortSurvival.R:73:3', 'test-addCohortSurvival.R:160:3',
    'test-addCohortSurvival.R:259:3', 'test-addCohortSurvival.R:351:3',
    'test-addCohortSurvival.R:455:3', 'test-addCohortSurvival.R:541:3',
    'test-addCohortSurvival.R:633:3', 'test-addCohortSurvival.R:712:3',
    'test-mockMGUS2cdm.R:2:3', 'test-plotSurvival.R:2:3',
    'test-plotSurvival.R:19:3', 'test-plotSurvival.R:52:3',
    'test-plotSurvival.R:83:3', 'test-plotSurvival.R:126:3',
    'test-plotSurvival.R:134:3', 'test-plotSurvival.R:157:3',
    'test-plotSurvival.R:186:3', 'test-reexports-omopgenerics.R:3:3',
    'test-riskTable.R:2:3', 'test-riskTable.R:65:3', 'test-tableSurvival.R:2:3',
    'test-tableSurvival.R:91:3', 'test-tableSurvival.R:117:3',
    'test-tableSurvival.R:141:3', 'test-tableSurvival.R:151:3',
    'test-tableSurvivalAttrition.R:2:3', 'test-estimateSurvival.R:80:3',
    'test-estimateSurvival.R:131:3', 'test-estimateSurvival.R:193:3',
    'test-estimateSurvival.R:351:3', 'test-estimateSurvival.R:556:3',
    'test-estimateSurvival.R:698:3', 'test-estimateSurvival.R:1166:3',
    'test-estimateSurvival.R:1278:3', 'test-estimateSurvival.R:1300:3',
    'test-estimateSurvival.R:1367:3', 'test-estimateSurvival.R:1552:3',
    'test-estimateSurvival.R:1665:3', 'test-estimateSurvival.R:1695:3',
    'test-estimateSurvival.R:1714:3', 'test-estimateSurvival.R:1747:3',
    'test-estimateSurvival.R:1876:3', 'test-estimateSurvival.R:2090:3',
    'test-estimateSurvival.R:2222:5', 'test-estimateSurvival.R:2435:3',
    'test-estimateSurvival.R:2467:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-plotSurvival.R:179:3'): plot with bound results with different hidden inputs ──
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `plotSurvival(surv_all, colour = "follow_up_days")`: The package "visOmopResults" is required.
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(plotSurvival(surv_all, colour = "follow_up_days")) at test-plotSurvival.R:179:3
   2. │ └─testthat:::expect_condition_matching_(...)
   3. │   └─testthat:::quasi_capture(...)
   4. │     ├─testthat (local) .capture(...)
   5. │     │ └─base::withCallingHandlers(...)
   6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   7. └─CohortSurvival::plotSurvival(surv_all, colour = "follow_up_days")
   8.   └─rlang::check_installed("visOmopResults")
  ── Error ('test-estimateSurvival.R:2253:5'): no outcomes among cohort ──────────
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `tableSurvival(surv, type = "tibble")`: The package "visOmopResults" (>= 0.5.0) is required.
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-estimateSurvival.R:2253:5
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─dplyr::pull(tableSurvival(surv, type = "tibble"), `[header_name]Estimate name\n[header_level]Number events`)
   5. └─CohortSurvival::tableSurvival(surv, type = "tibble")
   6.   └─rlang::check_installed("visOmopResults", version = "0.5.0")
  
  [ FAIL 2 | WARN 8 | SKIP 56 | PASS 62 ]
  Error:
  ! Test failures.
  Execution halted