Running 'testthat.R'
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(aba)
  > 
  > 
  > test_check("aba")
                                     Stratified by DX_bl
                                      level Overall                  
    n                                        2347           24       
    AGE (mean (SD))                         73.07 (7.43) 68.85 (8.30)
    GENDER (mean (SD))                       0.53 (0.50)  0.38 (0.49)
    EDUCATION (mean (SD))                   16.05 (2.75) 15.83 (2.16)
    ConvertedToAlzheimers (mean (SD))        0.20 (0.40)   NaN (NA)  
    CSF_ABETA_STATUS_bl (mean (SD))          0.62 (0.49)   NaN (NA)  
    PLASMA_PTAU181_bl (mean (SD))            2.71 (0.64)   NaN (NA)  
    PLASMA_NFL_bl (mean (SD))                3.54 (0.46)   NaN (NA)  
                                     Stratified by DX_bl
                                      AD           CU           MCI         
    n                                   405          846         1072       
    AGE (mean (SD))                   74.80 (7.92) 72.69 (6.34) 72.80 (7.89)
    GENDER (mean (SD))                 0.57 (0.50)  0.44 (0.50)  0.59 (0.49)
    EDUCATION (mean (SD))             15.20 (2.91) 16.54 (2.53) 15.99 (2.78)
    ConvertedToAlzheimers (mean (SD))  0.00 (NA)    0.03 (0.18)  0.33 (0.47)
    CSF_ABETA_STATUS_bl (mean (SD))    0.88 (0.33)  0.39 (0.49)  0.63 (0.48)
    PLASMA_PTAU181_bl (mean (SD))      3.05 (0.41)  2.54 (0.67)  2.70 (0.64)
    PLASMA_NFL_bl (mean (SD))          3.77 (0.42)  3.45 (0.42)  3.52 (0.47)
                                     Stratified by DX_bl
                                      p      test
    n                                            
    AGE (mean (SD))                   <0.001     
    GENDER (mean (SD))                <0.001     
    EDUCATION (mean (SD))             <0.001     
    ConvertedToAlzheimers (mean (SD))     NA     
    CSF_ABETA_STATUS_bl (mean (SD))   <0.001     
    PLASMA_PTAU181_bl (mean (SD))     <0.001     
    PLASMA_NFL_bl (mean (SD))         <0.001     
  [ FAIL 8 | WARN 0 | SKIP 2 | PASS 128 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-aba_longpower.R:21:3): example works ──────────────────────────
  `... <- NULL` threw an unexpected error.
  Message: Problem with `mutate()` column `power_fit`.
  i `power_fit = list(calculate_power(.data$fit, param_df))`.
  x Problem with `mutate()` column `n`.
  i `n = calculate_power_individual(...)`.
  x there is no package called 'longpower'
  i The error occurred in row 1.
  i The error occurred in row 1.
  Class:   dplyr:::mutate_error/dplyr_error/rlang_error/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(...) test-aba_longpower.R:21:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─`%>%`(...)
    8. ├─aba::aba_longpower(...)
    9. │ └─`%>%`(...)
   10. ├─dplyr::mutate(...)
   11. ├─dplyr:::mutate.data.frame(...)
   12. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
   13. │   ├─base::withCallingHandlers(...)
   14. │   └─mask$eval_all_mutate(quo)
   15. ├─aba:::calculate_power(.data$fit, param_df)
   16. │ └─`%>%`(...)
   17. ├─dplyr::ungroup(.)
   18. ├─dplyr::mutate(...)
   19. ├─dplyr:::mutate.data.frame(...)
   20. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
   21. │   ├─base::withCallingHandlers(...)
   22. │   └─mask$eval_all_mutate(quo)
   23. ├─aba:::calculate_power_individual(...)
   24. ├─base::loadNamespace(x)
   25. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   26. │ │ └─base:::withOneRestart(expr, restarts[[1L]])
   27. │ │   └─base:::doWithOneRestart(return(expr), restart)
   28. │ └─base::stop(cond)
   29. └─(function (e) ...
  ── Error (test-aba_longpower.R:34:3): example works ────────────────────────────
  Error in `print(pwr)`: object 'pwr' not found
  Backtrace:
       █
    1. ├─testthat::expect_output(print(pwr), NULL) test-aba_longpower.R:34:2
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─testthat::capture_output_lines(code, print, width = width)
    5. │   │   └─testthat:::eval_with_output(code, print = print, width = width)
    6. │   │     ├─withr::with_output_sink(path, withVisible(code))
    7. │   │     │ └─base::force(code)
    8. │   │     └─base::withVisible(code)
    9. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─base::print(pwr)
  ── Failure (test-aba_robust.R:32:3): example works ─────────────────────────────
  `fig <- model_robust %>% aba_plot_metric()` threw an unexpected error.
  Message: there is no package called 'ggpubr'
  Class:   packageNotFoundError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(...) test-aba_robust.R:32:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─model_robust %>% aba_plot_metric()
    8. ├─aba::aba_plot_metric(.)
    9. └─base::loadNamespace(x)
   10.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.     └─base:::withOneRestart(expr, restarts[[1L]])
   12.       └─base:::doWithOneRestart(return(expr), restart)
  ── Failure (test-stat_glm.R:28:3): complete.cases=F works ──────────────────────
  `g <- ms %>% aba_plot_metric()` threw an unexpected error.
  Message: there is no package called 'ggpubr'
  Class:   packageNotFoundError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(g <- ms %>% aba_plot_metric(), NA) test-stat_glm.R:28:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─ms %>% aba_plot_metric()
    8. ├─aba::aba_plot_metric(.)
    9. └─base::loadNamespace(x)
   10.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.     └─base:::withOneRestart(expr, restarts[[1L]])
   12.       └─base:::doWithOneRestart(return(expr), restart)
  ── Failure (test-stat_glm.R:33:3): complete.cases=F works ──────────────────────
  `g <- ms %>% aba_plot_coef()` threw an unexpected error.
  Message: there is no package called 'ggpubr'
  Class:   packageNotFoundError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(g <- ms %>% aba_plot_coef(), NA) test-stat_glm.R:33:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─ms %>% aba_plot_coef()
    8. ├─aba::aba_plot_coef(.)
    9. └─base::loadNamespace(x)
   10.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.     └─base:::withOneRestart(expr, restarts[[1L]])
   12.       └─base:::doWithOneRestart(return(expr), restart)
  ── Failure (test-stat_glm.R:38:3): complete.cases=F works ──────────────────────
  `g <- ms %>% aba_plot_coef(coord_flip = T)` threw an unexpected error.
  Message: there is no package called 'ggpubr'
  Class:   packageNotFoundError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(...) test-stat_glm.R:38:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─ms %>% aba_plot_coef(coord_flip = T)
    8. ├─aba::aba_plot_coef(., coord_flip = T)
    9. └─base::loadNamespace(x)
   10.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.     └─base:::withOneRestart(expr, restarts[[1L]])
   12.       └─base:::doWithOneRestart(return(expr), restart)
  ── Failure (test-stat_glm.R:43:3): complete.cases=F works ──────────────────────
  `g <- ms %>% aba_plot_roc()` threw an unexpected error.
  Message: Problem with `mutate()` column `plots`.
  i `plots = plot_roc_single(...)`.
  x there is no package called 'ggpubr'
  i The error occurred in row 1.
  Class:   dplyr:::mutate_error/dplyr_error/rlang_error/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(g <- ms %>% aba_plot_roc(), NA) test-stat_glm.R:43:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─ms %>% aba_plot_roc()
    8. ├─aba::aba_plot_roc(.)
    9. │ └─`%>%`(...)
   10. ├─dplyr::mutate(...)
   11. ├─dplyr:::mutate.data.frame(...)
   12. │ └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
   13. │   ├─base::withCallingHandlers(...)
   14. │   └─mask$eval_all_mutate(quo)
   15. ├─aba:::plot_roc_single(...)
   16. ├─base::loadNamespace(x)
   17. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   18. │ │ └─base:::withOneRestart(expr, restarts[[1L]])
   19. │ │   └─base:::doWithOneRestart(return(expr), restart)
   20. │ └─base::stop(cond)
   21. └─(function (e) ...
  ── Failure (test-stat_retest.R:31:3): example works ────────────────────────────
  `... <- NULL` threw an unexpected error.
  Message: there is no package called 'ggpubr'
  Class:   packageNotFoundError/error/condition
  Backtrace:
       █
    1. ├─testthat::expect_error(...) test-stat_retest.R:31:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat:::.capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─`%>%`(...)
    8. ├─aba::aba_plot_coef(...)
    9. └─base::loadNamespace(x)
   10.   └─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   11.     └─base:::withOneRestart(expr, restarts[[1L]])
   12.       └─base:::doWithOneRestart(return(expr), restart)
  
  [ FAIL 8 | WARN 0 | SKIP 2 | PASS 128 ]
  Error: Test failures
  Execution halted