Running ‘spelling.R’ [0s/0s]
  Running ‘testthat.R’ [24s/32s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(gtreg)
  
  Attaching package: 'gtreg'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  > 
  > test_check("gtreg")
  [ FAIL 6 | WARN 34 | SKIP 5 | PASS 69 ]
  
  ══ Skipped tests (5) ═══════════════════════════════════════════════════════════
  • On CRAN (5): 'test-add_overall.R:1:1', 'test-style_xxx.R:110:3',
    'test-tbl_ae.R:1:1', 'test-tbl_ae_count.R:1:1', 'test-tbl_ae_focus.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-inline_text.R:2:3'): inline text works ─────────────────────────
  Error in `UseMethod("filter")`: no applicable method for 'filter' applied to an object of class "NULL"
  Backtrace:
       ▆
    1. ├─testthat::expect_equal(...) at test-inline_text.R:2:3
    2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─... %>% inline_text(row = "Anaemia", column = stat_5)
    5. ├─gtsummary::inline_text(., row = "Anaemia", column = stat_5)
    6. └─gtreg::tbl_ae(., id = patient_id, ae = adverse_event, by = grade)
    7.   └─gtreg:::.construct_summary_table(...)
    8.     └─gtreg (local) .final_summary_fun(data)
    9.       └─gtreg:::.build_single_summary_table(...)
   10.         └─dplyr::filter(tbl$table_styling$footnote, FALSE)
  ── Error ('test-modify_header.R:2:3'): modify_header() works ───────────────────
  <dplyr:::mutate_error/rlang_error/error/condition>
  Error in `dplyr::mutate(., tbl = switch(.parent_fun, tbl_strata = map(.data$data, 
      .tbl_fun, ...), tbl_strata2 = map2(.data$data, .data$header, 
      .tbl_fun, ...)))`: i In argument: `tbl = switch(...)`.
  Caused by error in `UseMethod()`:
  ! no applicable method for 'filter' applied to an object of class "NULL"
  Backtrace:
       ▆
    1. ├─... %>% ... at test-modify_header.R:2:3
    2. ├─gtreg::tbl_ae(...)
    3. │ └─gtreg:::.construct_summary_table(...)
    4. │   └─gtsummary::tbl_strata(...)
    5. │     └─gtsummary:::tbl_strata_internal(...)
    6. │       └─... %>% ...
    7. ├─dplyr::mutate(...)
    8. ├─dplyr:::mutate.data.frame(...)
    9. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
   10. │   ├─base::withCallingHandlers(...)
   11. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
   12. │     └─mask$eval_all_mutate(quo)
   13. │       └─dplyr (local) eval()
   14. ├─gtsummary:::map(.data$data, .tbl_fun, ...)
   15. │ └─base::lapply(.x, .f, ...)
   16. │   └─gtreg (local) FUN(X[[i]], ...)
   17. │     └─gtreg (local) .final_summary_fun(data = .x)
   18. │       └─gtreg:::.build_single_summary_table(...)
   19. │         └─dplyr::filter(tbl$table_styling$footnote, FALSE)
   20. └─base::.handleSimpleError(...)
   21.   └─dplyr (local) h(simpleError(msg, call))
   22.     └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
  ── Failure ('test-style_xxx.R:22:3'): style_xxx works with tbl_ae family ───────
  `... <- NULL` threw an unexpected error.
  Message: no applicable method for 'filter' applied to an object of class "NULL"
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-style_xxx.R:22: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. ├─... %>% modify_spanning_header(all_ae_cols() ~ "**N = xx**")
    8. ├─gtsummary::modify_spanning_header(., all_ae_cols() ~ "**N = xx**")
    9. ├─gtsummary::modify_header(., all_ae_cols() ~ "**Grade {by}**")
   10. └─gtreg::tbl_ae(...)
   11.   └─gtreg:::.construct_summary_table(...)
   12.     └─gtreg (local) .final_summary_fun(data)
   13.       └─gtreg:::.build_single_summary_table(...)
   14.         └─dplyr::filter(tbl$table_styling$footnote, FALSE)
  ── Failure ('test-style_xxx.R:38:3'): style_xxx works with tbl_ae family ───────
  `... <- NULL` threw an unexpected error.
  Message: no applicable method for 'filter' applied to an object of class "NULL"
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-style_xxx.R:38: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. ├─... %>% modify_spanning_header(all_ae_cols() ~ "**N = xx**")
    8. ├─gtsummary::modify_spanning_header(., all_ae_cols() ~ "**N = xx**")
    9. ├─gtsummary::modify_header(., all_ae_cols() ~ "**Grade {by}**")
   10. └─gtreg::tbl_ae_count(...)
   11.   └─gtreg:::.construct_summary_table(...)
   12.     └─gtreg (local) .final_summary_fun(data)
   13.       └─gtreg:::.build_single_summary_table(...)
   14.         └─dplyr::filter(tbl$table_styling$footnote, FALSE)
  ── Failure ('test-style_xxx.R:52:3'): style_xxx works with tbl_ae family ───────
  `... <- NULL` threw an unexpected error.
  Message: i In index: 1.
  i With name: any_complication.
  Caused by error in `UseMethod()`:
  ! no applicable method for 'filter' applied to an object of class "NULL"
  Class:   purrr_error_indexed/rlang_error/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-style_xxx.R:52: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. ├─... %>% modify_spanning_header(all_ae_cols() ~ "**N = xx**")
    8. ├─gtsummary::modify_spanning_header(., all_ae_cols() ~ "**N = xx**")
    9. ├─gtreg::tbl_ae_focus(...)
   10. │ └─... %>% gtsummary::tbl_merge(tab_spanner = FALSE)
   11. ├─gtsummary::tbl_merge(., tab_spanner = FALSE)
   12. ├─purrr::imap(...)
   13. │ └─purrr::map2(.x, vec_index(.x), .f, ...)
   14. │   └─purrr:::map2_("list", .x, .y, .f, ..., .progress = .progress)
   15. │     ├─purrr:::with_indexed_errors(...)
   16. │     │ └─base::withCallingHandlers(...)
   17. │     ├─purrr:::call_with_cleanup(...)
   18. │     └─gtreg (local) .f(.x[[i]], .y[[i]], ...)
   19. │       └─gtreg:::.construct_summary_table(...)
   20. │         └─gtreg (local) .final_summary_fun(data)
   21. │           └─gtreg:::.build_single_summary_table(...)
   22. │             └─dplyr::filter(tbl$table_styling$footnote, FALSE)
   23. └─base::.handleSimpleError(...)
   24.   └─purrr (local) h(simpleError(msg, call))
   25.     └─cli::cli_abort(...)
   26.       └─rlang::abort(...)
  ── Error ('test-style_xxx.R:67:3'): style_xxx works with tbl_ae family ─────────
  Error: object 't1' not found
  Backtrace:
      ▆
   1. └─testthat::expect_snapshot(as.data.frame(t1)) at test-style_xxx.R:67:3
   2.   └─rlang::cnd_signal(state$error)
  
  [ FAIL 6 | WARN 34 | SKIP 5 | PASS 69 ]
  Error: Test failures
  Execution halted