Running 'testthat.R' [99s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(DrugExposureDiagnostics)
  > 
  > test_check("DrugExposureDiagnostics")
  trying URL 'https://raw.githubusercontent.com/darwin-eu/EunomiaDatasets/main/datasets/GiBleed/GiBleed_5.3.zip'
  Content type 'application/zip' length 6848518 bytes (6.5 MB)
  ==================================================
  downloaded 6.5 MB
  
  attempting to extract and load D:\temp\Rtmp6VLTy0/GiBleed_5.3.zip
  Progress: getting descendant concepts of ingredient (1125315) used in database
  Progress: getting descendant concepts of ingredient
  Progress: adding drug strength info
  Progress: limiting to concepts in the db
  Progress: adding concept names
  Overall time taken: 0 minutes and 2 seconds
  Time taken: 0 minutes and 2 seconds
  Progress: getting drug strength for ingredient
  Time taken: 0 minutes and 0 seconds
  Progress: getting drug records for ingredient
  Time taken: 0 minutes and 0 seconds
  Progress: get concepts used
  Time taken: 0 minutes and 0 seconds
  Progress: get ingredient overview
  Time taken: 0 minutes and 0 seconds
  testMessage
  [ FAIL 11 | WARN 0 | SKIP 1 | PASS 175 ]
  
  == Skipped tests ===============================================================
  * Sys.getenv("TESTDB_USER") == "" is TRUE (1)
  
  == Failed tests ================================================================
  -- Error ('test-Eunomia.R:5'): execute all checks, default ingredient, verbose --
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = startDateCol, end = endDateCol, 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics::executeChecks(cdm, verbose = TRUE) at test-Eunomia.R:5:2
    2. | \-DrugExposureDiagnostics:::executeChecksSingleIngredient(...)
    3. |   +-... %>% dplyr::collect()
    4. |   \-DrugExposureDiagnostics:::getIngredientOverview(...)
    5. |     +-... %>% ...
    6. |     \-DrugExposureDiagnostics:::getDuration(...)
    7. |       \-cdm[[tableName]] %>% ...
    8. +-dplyr::collect(.)
    9. +-dplyr::mutate(...)
   10. +-dplyr::left_join(...)
   11. +-dplyr::mutate(...)
   12. +-dbplyr:::mutate.tbl_lazy(...)
   13. | \-dbplyr:::get_mutate_layers(.data, ...)
   14. |   +-base::as.list(enquos(..., .named = TRUE))
   15. |   \-rlang::enquos(..., .named = TRUE)
   16. |     \-rlang:::endots(...)
   17. |       \-rlang:::map(...)
   18. |         \-base::lapply(.x, .f, ...)
   19. |           \-rlang (local) FUN(X[[i]], ...)
   20. |             \-rlang::splice(...)
   21. \-CDMConnector::datediff(...)
   22.   \-rlang::check_installed("SqlRender")
  -- Error ('test-Eunomia.R:25'): execute all checks, given ingredient -----------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = startDateCol, end = endDateCol, 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics::executeChecks(cdm, 1125315) at test-Eunomia.R:25:2
    2. | \-DrugExposureDiagnostics:::executeChecksSingleIngredient(...)
    3. |   +-... %>% dplyr::collect()
    4. |   \-DrugExposureDiagnostics:::getIngredientOverview(...)
    5. |     +-... %>% ...
    6. |     \-DrugExposureDiagnostics:::getDuration(...)
    7. |       \-cdm[[tableName]] %>% ...
    8. +-dplyr::collect(.)
    9. +-dplyr::mutate(...)
   10. +-dplyr::left_join(...)
   11. +-dplyr::mutate(...)
   12. +-dbplyr:::mutate.tbl_lazy(...)
   13. | \-dbplyr:::get_mutate_layers(.data, ...)
   14. |   +-base::as.list(enquos(..., .named = TRUE))
   15. |   \-rlang::enquos(..., .named = TRUE)
   16. |     \-rlang:::endots(...)
   17. |       \-rlang:::map(...)
   18. |         \-base::lapply(.x, .f, ...)
   19. |           \-rlang (local) FUN(X[[i]], ...)
   20. |             \-rlang::splice(...)
   21. \-CDMConnector::datediff(...)
   22.   \-rlang::check_installed("SqlRender")
  -- Error ('test-Eunomia.R:38'): execute some checks, given ingredient ----------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = startDateCol, end = endDateCol, 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics::executeChecks(...) at test-Eunomia.R:38:2
    2. | \-DrugExposureDiagnostics:::executeChecksSingleIngredient(...)
    3. |   +-... %>% dplyr::collect()
    4. |   \-DrugExposureDiagnostics:::getIngredientOverview(...)
    5. |     +-... %>% ...
    6. |     \-DrugExposureDiagnostics:::getDuration(...)
    7. |       \-cdm[[tableName]] %>% ...
    8. +-dplyr::collect(.)
    9. +-dplyr::mutate(...)
   10. +-dplyr::left_join(...)
   11. +-dplyr::mutate(...)
   12. +-dbplyr:::mutate.tbl_lazy(...)
   13. | \-dbplyr:::get_mutate_layers(.data, ...)
   14. |   +-base::as.list(enquos(..., .named = TRUE))
   15. |   \-rlang::enquos(..., .named = TRUE)
   16. |     \-rlang:::endots(...)
   17. |       \-rlang:::map(...)
   18. |         \-base::lapply(.x, .f, ...)
   19. |           \-rlang (local) FUN(X[[i]], ...)
   20. |             \-rlang::splice(...)
   21. \-CDMConnector::datediff(...)
   22.   \-rlang::check_installed("SqlRender")
  -- Error ('test-Eunomia.R:132'): get number of Days_supply that are incorrect --
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = "drug_exposure_start_date", end = "drug_exposure_end_date", 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics:::checkDaysSupply(cdm, drugRecordsTable = "ingredient_drug_records") at test-Eunomia.R:132:2
    2. | \-... %>% dplyr::collect()
    3. +-dplyr::collect(.)
    4. +-dplyr::mutate(...)
    5. +-dbplyr:::mutate.tbl_lazy(...)
    6. | \-dbplyr:::get_mutate_layers(.data, ...)
    7. |   +-base::as.list(enquos(..., .named = TRUE))
    8. |   \-rlang::enquos(..., .named = TRUE)
    9. |     \-rlang:::endots(...)
   10. |       \-rlang:::map(...)
   11. |         \-base::lapply(.x, .f, ...)
   12. |           \-rlang (local) FUN(X[[i]], ...)
   13. |             \-rlang::splice(...)
   14. \-CDMConnector::datediff(...)
   15.   \-rlang::check_installed("SqlRender")
  -- Error ('test-Eunomia.R:145'): sampling --------------------------------------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = startDateCol, end = endDateCol, 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics::executeChecks(...) at test-Eunomia.R:145:2
    2. | \-DrugExposureDiagnostics:::executeChecksSingleIngredient(...)
    3. |   +-... %>% dplyr::collect()
    4. |   \-DrugExposureDiagnostics:::getIngredientOverview(...)
    5. |     +-... %>% ...
    6. |     \-DrugExposureDiagnostics:::getDuration(...)
    7. |       \-cdm[[tableName]] %>% ...
    8. +-dplyr::collect(.)
    9. +-dplyr::mutate(...)
   10. +-dplyr::left_join(...)
   11. +-dplyr::mutate(...)
   12. +-dbplyr:::mutate.tbl_lazy(...)
   13. | \-dbplyr:::get_mutate_layers(.data, ...)
   14. |   +-base::as.list(enquos(..., .named = TRUE))
   15. |   \-rlang::enquos(..., .named = TRUE)
   16. |     \-rlang:::endots(...)
   17. |       \-rlang:::map(...)
   18. |         \-base::lapply(.x, .f, ...)
   19. |           \-rlang (local) FUN(X[[i]], ...)
   20. |             \-rlang::splice(...)
   21. \-CDMConnector::datediff(...)
   22.   \-rlang::check_installed("SqlRender")
  -- Error ('test-Eunomia.R:165'): summary ---------------------------------------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = startDateCol, end = endDateCol, 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics::executeChecks(cdm = cdm, ingredients = 1125315) at test-Eunomia.R:165:2
    2. | \-DrugExposureDiagnostics:::executeChecksSingleIngredient(...)
    3. |   +-... %>% dplyr::collect()
    4. |   \-DrugExposureDiagnostics:::getIngredientOverview(...)
    5. |     +-... %>% ...
    6. |     \-DrugExposureDiagnostics:::getDuration(...)
    7. |       \-cdm[[tableName]] %>% ...
    8. +-dplyr::collect(.)
    9. +-dplyr::mutate(...)
   10. +-dplyr::left_join(...)
   11. +-dplyr::mutate(...)
   12. +-dbplyr:::mutate.tbl_lazy(...)
   13. | \-dbplyr:::get_mutate_layers(.data, ...)
   14. |   +-base::as.list(enquos(..., .named = TRUE))
   15. |   \-rlang::enquos(..., .named = TRUE)
   16. |     \-rlang:::endots(...)
   17. |       \-rlang:::map(...)
   18. |         \-base::lapply(.x, .f, ...)
   19. |           \-rlang (local) FUN(X[[i]], ...)
   20. |             \-rlang::splice(...)
   21. \-CDMConnector::datediff(...)
   22.   \-rlang::check_installed("SqlRender")
  -- Error ('test-IngredientOverview.R:35'): getIngredientOverview ---------------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = startDateCol, end = endDateCol, 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-... %>% dplyr::collect() at test-IngredientOverview.R:35:2
    2. +-dplyr::collect(.)
    3. +-DrugExposureDiagnostics:::getIngredientOverview(...)
    4. | +-... %>% ...
    5. | \-DrugExposureDiagnostics:::getDuration(...)
    6. |   \-cdm[[tableName]] %>% ...
    7. +-dplyr::mutate(...)
    8. +-dplyr::left_join(...)
    9. +-dplyr::mutate(...)
   10. +-dbplyr:::mutate.tbl_lazy(...)
   11. | \-dbplyr:::get_mutate_layers(.data, ...)
   12. |   +-base::as.list(enquos(..., .named = TRUE))
   13. |   \-rlang::enquos(..., .named = TRUE)
   14. |     \-rlang:::endots(...)
   15. |       \-rlang:::map(...)
   16. |         \-base::lapply(.x, .f, ...)
   17. |           \-rlang (local) FUN(X[[i]], ...)
   18. |             \-rlang::splice(...)
   19. \-CDMConnector::datediff(...)
   20.   \-rlang::check_installed("SqlRender")
  -- Error ('test-IngredientOverview.R:64'): getIngredientsPresence --------------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = "drug_exposure_start_date", end = "drug_exposure_end_date", 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-... %>% dplyr::collect() at test-IngredientOverview.R:64:2
    2. +-dplyr::collect(.)
    3. +-DrugExposureDiagnostics:::getIngredientPresence(...)
    4. | \-... %>% ...
    5. +-dplyr::mutate(...)
    6. +-dplyr::mutate(...)
    7. +-dplyr::mutate(...)
    8. +-dplyr::mutate(...)
    9. +-dplyr::mutate(...)
   10. +-dplyr::mutate(...)
   11. +-dplyr::mutate(...)
   12. +-dplyr::mutate(...)
   13. +-dbplyr:::mutate.tbl_lazy(...)
   14. | \-dbplyr:::get_mutate_layers(.data, ...)
   15. |   +-base::as.list(enquos(..., .named = TRUE))
   16. |   \-rlang::enquos(..., .named = TRUE)
   17. |     \-rlang:::endots(...)
   18. |       \-rlang:::map(...)
   19. |         \-base::lapply(.x, .f, ...)
   20. |           \-rlang (local) FUN(X[[i]], ...)
   21. |             \-rlang::splice(...)
   22. \-CDMConnector::datediff(...)
   23.   \-rlang::check_installed("SqlRender")
  -- Error ('test-checkDaysSupply.R:25'): check if it can detect missing ---------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = "drug_exposure_start_date", end = "drug_exposure_end_date", 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics:::checkDaysSupply(testData, byConcept = TRUE) at test-checkDaysSupply.R:25:2
    2. | \-... %>% dplyr::collect()
    3. +-dplyr::collect(.)
    4. +-dplyr::mutate(...)
    5. +-dbplyr:::mutate.tbl_lazy(...)
    6. | \-dbplyr:::get_mutate_layers(.data, ...)
    7. |   +-base::as.list(enquos(..., .named = TRUE))
    8. |   \-rlang::enquos(..., .named = TRUE)
    9. |     \-rlang:::endots(...)
   10. |       \-rlang:::map(...)
   11. |         \-base::lapply(.x, .f, ...)
   12. |           \-rlang (local) FUN(X[[i]], ...)
   13. |             \-rlang::splice(...)
   14. \-CDMConnector::datediff(...)
   15.   \-rlang::check_installed("SqlRender")
  -- Error ('test-getHistogram.R:27'): test histogram plotting -------------------
  <rlib_error_package_not_found/rlang_error/error/condition>
  Error in `CDMConnector::datediff(start = startDateCol, end = endDateCol, 
      interval = "day")`: The package `SqlRender` is required.
  Backtrace:
       x
    1. +-DrugExposureDiagnostics:::createHistogram(...) at test-getHistogram.R:27:2
    2. | \-DrugExposureDiagnostics:::getDuration(cdm, drugRecordsTable)
    3. |   \-cdm[[tableName]] %>% ...
    4. +-dplyr::mutate(...)
    5. +-dbplyr:::mutate.tbl_lazy(...)
    6. | \-dbplyr:::get_mutate_layers(.data, ...)
    7. |   +-base::as.list(enquos(..., .named = TRUE))
    8. |   \-rlang::enquos(..., .named = TRUE)
    9. |     \-rlang:::endots(...)
   10. |       \-rlang:::map(...)
   11. |         \-base::lapply(.x, .f, ...)
   12. |           \-rlang (local) FUN(X[[i]], ...)
   13. |             \-rlang::splice(...)
   14. \-CDMConnector::datediff(...)
   15.   \-rlang::check_installed("SqlRender")
  -- Failure ('test-utils.R:7'): check summary calculation -----------------------
  (result - startTime) > 0 is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 11 | WARN 0 | SKIP 1 | PASS 175 ]
  Error: Test failures
  In addition: There were 36 warnings (use warnings() to see them)
  Execution halted
  There were 12 warnings (use warnings() to see them)