Running 'testthat.R' [19s]
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 4 | SKIP 42 | PASS 0 ]
  
  ══ Skipped tests (42) ══════════════════════════════════════════════════════════
  • On CRAN (42): 'test-benchmarkCohortSurvival.R:2:3',
    'test-benchmarkCohortSurvival.R:63:3', 'test-addCohortSurvival.R:71:3',
    'test-addCohortSurvival.R:158:3', 'test-addCohortSurvival.R:271:3',
    'test-addCohortSurvival.R:377:3', 'test-addCohortSurvival.R:489:3',
    'test-addCohortSurvival.R:581:3', 'test-addCohortSurvival.R:681:3',
    'test-addCohortSurvival.R:767:3', 'test-generateDeathCohort.R:2:3',
    'test-generateDeathCohort.R:62:3', 'test-generateDeathCohort.R:129:3',
    'test-generateDeathCohort.R:196:3', 'test-generateDeathCohort.R:263:3',
    'test-generateDeathCohort.R:352:3', 'test-generateDeathCohort.R:452:3',
    'test-mockMGUS2cdm.R:2:3', 'test-plotSurvival.R:2:3',
    'test-plotSurvival.R:19:3', 'test-plotSurvival.R:37:3',
    'test-plotSurvival.R:57:3', 'test-plotSurvival.R:77:3',
    'test-plotSurvival.R:98:3', 'test-plotSurvival.R:116:3',
    'test-plotSurvival.R:136:3', 'test-survivalSummary.R:2:3',
    'test-estimateSurvival.R:103:3', 'test-estimateSurvival.R:145:3',
    'test-estimateSurvival.R:199:3', 'test-estimateSurvival.R:366:3',
    'test-estimateSurvival.R:578:3', 'test-estimateSurvival.R:739:3',
    'test-estimateSurvival.R:1277:3', 'test-estimateSurvival.R:1408:3',
    'test-estimateSurvival.R:1426:3', 'test-estimateSurvival.R:1459:3',
    'test-estimateSurvival.R:1535:3', 'test-estimateSurvival.R:1737:3',
    'test-estimateSurvival.R:1861:3', 'test-estimateSurvival.R:1889:3',
    'test-estimateSurvival.R:1908:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-addCohortSurvival.R:54:3'): working example ────────────────────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─cdm2$cohort1 %>% ... at test-addCohortSurvival.R:54:3
    2. ├─CohortSurvival::addCohortSurvival(...)
    3. │ └─... %>% CDMConnector::computeQuery()
    4. ├─CDMConnector::computeQuery(.)
    5. │ └─CDMConnector:::.computeQuery(...)
    6. │   └─base::is.data.frame(x)
    7. ├─PatientProfiles::addFutureObservation(...)
    8. │ └─x %>% ...
    9. ├─PatientProfiles::addDemographics(...)
   10. │ └─x %>% dplyr::compute()
   11. ├─dplyr::compute(.)
   12. ├─omopgenerics:::compute.cdm_table(.)
   13. │ ├─dplyr::compute(...)
   14. │ └─CDMConnector:::compute.db_cdm(...)
   15. │   └─CDMConnector:::.computeQuery(...)
   16. │     └─dbplyr::sql_render(x)
   17. │       ├─dbplyr::sql_render(...)
   18. │       └─dbplyr:::sql_render.tbl_lazy(...)
   19. │         ├─dbplyr::sql_render(...)
   20. │         └─dbplyr:::sql_render.lazy_query(...)
   21. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   22. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   23. │             └─dbplyr:::get_select_sql(...)
   24. │               └─dbplyr:::translate_select_sql(con, select)
   25. │                 └─dbplyr::translate_sql_(...)
   26. │                   └─base::lapply(...)
   27. │                     └─dbplyr (local) FUN(X[[i]], ...)
   28. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   29. │                       └─rlang::eval_tidy(x, mask)
   30. └─CDMConnector::datediff
   31.   └─cli::cli_abort(...)
   32.     └─rlang::abort(...)
  ── Error ('test-estimateSurvival.R:9:3'): mgus example: no Competing risk ──────
  Error in `CDMConnector::datediff()`: No known SQL translation
  Backtrace:
       ▆
    1. ├─CohortSurvival::estimateSingleEventSurvival(...) at test-estimateSurvival.R:9:3
    2. │ └─CohortSurvival:::estimateSurvival(...)
    3. │   └─... %>% ...
    4. ├─dplyr::rename(., outcome_time = "time", outcome_status = "status")
    5. ├─CohortSurvival::addCohortSurvival(...)
    6. │ └─... %>% CDMConnector::computeQuery()
    7. ├─CDMConnector::computeQuery(.)
    8. │ └─CDMConnector:::.computeQuery(...)
    9. │   └─base::is.data.frame(x)
   10. ├─PatientProfiles::addFutureObservation(...)
   11. │ └─x %>% ...
   12. ├─PatientProfiles::addDemographics(...)
   13. │ └─x %>% dplyr::compute()
   14. ├─dplyr::compute(.)
   15. ├─omopgenerics:::compute.cdm_table(.)
   16. │ ├─dplyr::compute(...)
   17. │ └─CDMConnector:::compute.db_cdm(...)
   18. │   └─CDMConnector:::.computeQuery(...)
   19. │     └─dbplyr::sql_render(x)
   20. │       ├─dbplyr::sql_render(...)
   21. │       └─dbplyr:::sql_render.tbl_lazy(...)
   22. │         ├─dbplyr::sql_render(...)
   23. │         └─dbplyr:::sql_render.lazy_query(...)
   24. │           ├─dbplyr::sql_build(query, con = con, sql_options = sql_options)
   25. │           └─dbplyr:::sql_build.lazy_select_query(query, con = con, sql_options = sql_options)
   26. │             └─dbplyr:::get_select_sql(...)
   27. │               └─dbplyr:::translate_select_sql(con, select)
   28. │                 └─dbplyr::translate_sql_(...)
   29. │                   └─base::lapply(...)
   30. │                     └─dbplyr (local) FUN(X[[i]], ...)
   31. │                       ├─dbplyr::escape(eval_tidy(x, mask), con = con)
   32. │                       └─rlang::eval_tidy(x, mask)
   33. └─CDMConnector::datediff
   34.   └─cli::cli_abort(...)
   35.     └─rlang::abort(...)
  
  [ FAIL 2 | WARN 4 | SKIP 42 | PASS 0 ]
  Error: Test failures
  Execution halted