Running ‘testthat.R’ [121s/196s]
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 5 | WARN 0 | SKIP 2 | PASS 127 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-stat_ancova.R:28:3): example works ────────────────────────────
  `ancova_summary <- ancova_model %>% summary()` threw an unexpected error.
  Message: Problem while computing `metrics = purrr::map2(...)`.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'psychometric'
  Class:   dplyr:::mutate_error/rlang_error/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-stat_ancova.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. ├─ancova_model %>% summary()
    8. ├─base::summary(.)
    9. ├─aba:::summary.abaModel(.)
   10. │ └─object %>% aba_summary(...)
   11. ├─aba::aba_summary(., ...)
   12. │ └─object %>% calculate_metrics(control)
   13. ├─aba:::calculate_metrics(., control)
   14. │ └─r %>% ...
   15. ├─dplyr::mutate(...)
   16. ├─dplyr:::mutate.data.frame(...)
   17. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   18. │   ├─base::withCallingHandlers(...)
   19. │   └─mask$eval_all_mutate(quo)
   20. ├─purrr::map2(...)
   21. │ └─aba .f(.x[[i]], .y[[i]], ...)
   22. │   ├─... %>% mutate(term = tolower(term))
   23. │   ├─aba:::aba_glance(model, basic_model)
   24. │   └─aba:::aba_glance.lm(model, basic_model)
   25. ├─dplyr::mutate(., term = tolower(term))
   26. ├─dplyr::arrange(., match(term, metric_vars))
   27. ├─dplyr::rename(., conf_low = conf.low, conf_high = conf.high)
   28. ├─dplyr::filter(., term %in% metric_vars)
   29. ├─base::loadNamespace(x)
   30. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   31. │ │ └─base withOneRestart(expr, restarts[[1L]])
   32. │ │   └─base doWithOneRestart(return(expr), restart)
   33. │ └─base::stop(cond)
   34. └─dplyr `<fn>`(`<pckgNtFE>`)
   35.   └─rlang::abort(...)
  ── Failure (test-stat_lm.R:6:3): complete.cases=F for lm works ─────────────────
  `... <- NULL` threw an unexpected error.
  Message: Problem while computing `metrics = purrr::map2(...)`.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'psychometric'
  Class:   dplyr:::mutate_error/rlang_error/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-stat_lm.R:6: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. ├─... %>% aba_summary()
    8. ├─aba::aba_summary(.)
    9. │ └─object %>% calculate_metrics(control)
   10. ├─aba:::calculate_metrics(., control)
   11. │ └─r %>% ...
   12. ├─dplyr::mutate(...)
   13. ├─dplyr:::mutate.data.frame(...)
   14. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   15. │   ├─base::withCallingHandlers(...)
   16. │   └─mask$eval_all_mutate(quo)
   17. ├─purrr::map2(...)
   18. │ └─aba .f(.x[[i]], .y[[i]], ...)
   19. │   ├─... %>% mutate(term = tolower(term))
   20. │   ├─aba:::aba_glance(model, basic_model)
   21. │   └─aba:::aba_glance.lm(model, basic_model)
   22. ├─dplyr::mutate(., term = tolower(term))
   23. ├─dplyr::arrange(., match(term, metric_vars))
   24. ├─dplyr::rename(., conf_low = conf.low, conf_high = conf.high)
   25. ├─dplyr::filter(., term %in% metric_vars)
   26. ├─base::loadNamespace(x)
   27. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   28. │ │ └─base withOneRestart(expr, restarts[[1L]])
   29. │ │   └─base doWithOneRestart(return(expr), restart)
   30. │ └─base::stop(cond)
   31. └─dplyr `<fn>`(`<pckgNtFE>`)
   32.   └─rlang::abort(...)
  ── Failure (test-stat_lm.R:41:3): std.beta works as intended for stat_lm ───────
  `... <- NULL` threw an unexpected error.
  Message: Problem while computing `metrics = purrr::map2(...)`.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'psychometric'
  Class:   dplyr:::mutate_error/rlang_error/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-stat_lm.R:41: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 %>% set_stats(stat_lm(std.beta = T)) %>% fit() %>% ...
    8. ├─base::summary(.)
    9. ├─aba:::summary.abaModel(.)
   10. │ └─object %>% aba_summary(...)
   11. ├─aba::aba_summary(., ...)
   12. │ └─object %>% calculate_metrics(control)
   13. ├─aba:::calculate_metrics(., control)
   14. │ └─r %>% ...
   15. ├─dplyr::mutate(...)
   16. ├─dplyr:::mutate.data.frame(...)
   17. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   18. │   ├─base::withCallingHandlers(...)
   19. │   └─mask$eval_all_mutate(quo)
   20. ├─purrr::map2(...)
   21. │ └─aba .f(.x[[i]], .y[[i]], ...)
   22. │   ├─... %>% mutate(term = tolower(term))
   23. │   ├─aba:::aba_glance(model, basic_model)
   24. │   └─aba:::aba_glance.lm(model, basic_model)
   25. ├─dplyr::mutate(., term = tolower(term))
   26. ├─dplyr::arrange(., match(term, metric_vars))
   27. ├─dplyr::rename(., conf_low = conf.low, conf_high = conf.high)
   28. ├─dplyr::filter(., term %in% metric_vars)
   29. ├─base::loadNamespace(x)
   30. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   31. │ │ └─base withOneRestart(expr, restarts[[1L]])
   32. │ │   └─base doWithOneRestart(return(expr), restart)
   33. │ └─base::stop(cond)
   34. └─dplyr `<fn>`(`<pckgNtFE>`)
   35.   └─rlang::abort(...)
  ── Failure (test-stat_lm.R:51:3): std.beta works as intended for stat_lm ───────
  `... <- NULL` threw an unexpected error.
  Message: Problem while computing `metrics = purrr::map2(...)`.
  Caused by error in `loadNamespace()`:
  ! there is no package called 'psychometric'
  Class:   dplyr:::mutate_error/rlang_error/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-stat_lm.R:51: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 %>% set_stats(stat_lm(std.beta = F)) %>% fit() %>% ...
    8. ├─base::summary(.)
    9. ├─aba:::summary.abaModel(.)
   10. │ └─object %>% aba_summary(...)
   11. ├─aba::aba_summary(., ...)
   12. │ └─object %>% calculate_metrics(control)
   13. ├─aba:::calculate_metrics(., control)
   14. │ └─r %>% ...
   15. ├─dplyr::mutate(...)
   16. ├─dplyr:::mutate.data.frame(...)
   17. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
   18. │   ├─base::withCallingHandlers(...)
   19. │   └─mask$eval_all_mutate(quo)
   20. ├─purrr::map2(...)
   21. │ └─aba .f(.x[[i]], .y[[i]], ...)
   22. │   ├─... %>% mutate(term = tolower(term))
   23. │   ├─aba:::aba_glance(model, basic_model)
   24. │   └─aba:::aba_glance.lm(model, basic_model)
   25. ├─dplyr::mutate(., term = tolower(term))
   26. ├─dplyr::arrange(., match(term, metric_vars))
   27. ├─dplyr::rename(., conf_low = conf.low, conf_high = conf.high)
   28. ├─dplyr::filter(., term %in% metric_vars)
   29. ├─base::loadNamespace(x)
   30. │ ├─base::withRestarts(stop(cond), retry_loadNamespace = function() NULL)
   31. │ │ └─base withOneRestart(expr, restarts[[1L]])
   32. │ │   └─base doWithOneRestart(return(expr), restart)
   33. │ └─base::stop(cond)
   34. └─dplyr `<fn>`(`<pckgNtFE>`)
   35.   └─rlang::abort(...)
  ── Error (test-stat_lm.R:61:3): std.beta works as intended for stat_lm ─────────
  Error in `all.equal(m1$results$coefs$estimate, m2$results$coefs$estimate)`: object 'm1' not found
  Backtrace:
      ▆
   1. ├─testthat::expect_false(...) at test-stat_lm.R:61:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─base::isTRUE(all.equal(m1$results$coefs$estimate, m2$results$coefs$estimate))
   5. └─base::all.equal(m1$results$coefs$estimate, m2$results$coefs$estimate)
  
  [ FAIL 5 | WARN 0 | SKIP 2 | PASS 127 ]
  Error: Test failures
  Execution halted