- using R version 4.4.1 Patched (2024-07-08 r86915)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-13 (Debian 13.3.0-3) 13.3.0
GNU Fortran (Debian 13.3.0-3) 13.3.0
- running under: Debian GNU/Linux trixie/sid
- using session charset: UTF-8
- checking for file ‘gtreg/DESCRIPTION’ ... OK
- this is package ‘gtreg’ version ‘0.3.0’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking serialization versions ... OK
- checking whether package ‘gtreg’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s/2s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/2s] OK
- checking loading without being on the library search path ... [1s/2s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [12s/15s] OK
- checking Rd files ... [1s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/1s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [4s/7s] ERROR
Running examples in ‘gtreg-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: tbl_reg_summary
> ### Title: Data Summary Table
> ### Aliases: tbl_reg_summary
>
> ### ** Examples
>
> tbl_reg_summary_ex1 <-
+ df_patient_characteristics %>%
+ tbl_reg_summary(by = trt, include = c(marker, status))
Error in `set_gtsummary_theme()`:
! The following names of `x` are not accepted theme elemets:
"tbl_summary-str:continuous_stat".
Backtrace:
▆
1. ├─df_patient_characteristics %>% ...
2. ├─gtreg::tbl_reg_summary(., by = trt, include = c(marker, status))
3. │ ├─... %>% ...
4. │ └─gtsummary::with_gtsummary_theme(...)
5. │ └─gtsummary::set_gtsummary_theme(suppressMessages(x))
6. │ └─cli::cli_abort(...)
7. │ └─rlang::abort(...)
8. └─base::structure(...)
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [29s/36s] ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [29s/36s]
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 11 | WARN 16 | SKIP 4 | PASS 65 ]
══ Skipped tests (4) ═══════════════════════════════════════════════════════════
• On CRAN (4): 'test-add_overall.R:1:1', '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. │ └─... %>% gtsummary::tbl_butcher()
11. ├─gtsummary::tbl_butcher(.)
12. │ └─gtsummary:::check_class(x, "gtsummary")
13. ├─gtreg:::.replace_zero_with_NA(., zero_symbol = zero_symbol)
14. │ └─... %>% tidyr::nest(data = "label")
15. ├─tidyr::nest(., data = "label")
16. ├─dplyr::select(., all_of(c("label", "col_name")))
17. ├─dplyr::filter(., .data$n == 0L)
18. ├─gtreg:::.hide_unobserved_columns(., columns = columns_to_hide)
19. │ └─... %>% dplyr::pull("by_col")
20. ├─dplyr::pull(., "by_col")
21. └─dplyr::filter(., .data$by_chr %in% .env$columns)
── 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. │ └─... %>% gtsummary::tbl_butcher()
20. ├─gtsummary::tbl_butcher(.)
21. │ └─gtsummary:::check_class(x, "gtsummary")
22. ├─gtreg:::.replace_zero_with_NA(., zero_symbol = zero_symbol)
23. │ └─... %>% tidyr::nest(data = "label")
24. ├─tidyr::nest(., data = "label")
25. ├─dplyr::select(., all_of(c("label", "col_name")))
26. ├─dplyr::filter(., .data$n == 0L)
27. ├─gtreg:::.hide_unobserved_columns(., columns = columns_to_hide)
28. │ └─... %>% dplyr::pull("by_col")
29. ├─dplyr::pull(., "by_col")
30. ├─dplyr::filter(., .data$by_chr %in% .env$columns)
31. └─base::.handleSimpleError(...)
32. └─dplyr (local) h(simpleError(msg, call))
33. └─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. │ └─... %>% gtsummary::tbl_butcher()
15. ├─gtsummary::tbl_butcher(.)
16. │ └─gtsummary:::check_class(x, "gtsummary")
17. ├─gtreg:::.replace_zero_with_NA(., zero_symbol = zero_symbol)
18. ├─gtreg:::.hide_unobserved_columns(., columns = columns_to_hide)
19. │ └─... %>% dplyr::pull("by_col")
20. ├─dplyr::pull(., "by_col")
21. └─dplyr::filter(., .data$by_chr %in% .env$columns)
── 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. │ └─... %>% gtsummary::tbl_butcher()
15. ├─gtsummary::tbl_butcher(.)
16. │ └─gtsummary:::check_class(x, "gtsummary")
17. ├─gtreg:::.replace_zero_with_NA(., zero_symbol = zero_symbol)
18. ├─gtreg:::.hide_unobserved_columns(., columns = columns_to_hide)
19. │ └─... %>% dplyr::pull("by_col")
20. ├─dplyr::pull(., "by_col")
21. └─dplyr::filter(., .data$by_chr %in% .env$columns)
── 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. │ └─... %>% gtsummary::tbl_butcher()
23. ├─gtsummary::tbl_butcher(.)
24. │ └─gtsummary:::check_class(x, "gtsummary")
25. ├─gtreg:::.replace_zero_with_NA(., zero_symbol = zero_symbol)
26. │ └─... %>% tidyr::nest(data = "label")
27. ├─tidyr::nest(., data = "label")
28. ├─dplyr::select(., all_of(c("label", "col_name")))
29. ├─dplyr::filter(., .data$n == 0L)
30. ├─gtreg:::.hide_unobserved_columns(., columns = columns_to_hide)
31. │ └─... %>% dplyr::pull("by_col")
32. ├─dplyr::pull(., "by_col")
33. ├─dplyr::filter(., .data$by_chr %in% .env$columns)
34. └─base::.handleSimpleError(...)
35. └─purrr (local) h(simpleError(msg, call))
36. └─cli::cli_abort(...)
37. └─rlang::abort(...)
── Error ('test-style_xxx.R:67:3'): style_xxx works with tbl_ae family ─────────
Error in `eval(expr, envir, enclos)`: object 't1' not found
Backtrace:
▆
1. └─testthat::expect_snapshot(as_gt(t1, id = "t1_001")) at test-style_xxx.R:67:3
2. └─rlang::cnd_signal(state$error)
── Failure ('test-style_xxx.R:76:3'): style_xxx works with tbl_reg_summary ─────
`... <- NULL` threw an unexpected error.
Message: The following names of `x` are not accepted theme elemets: "tbl_summary-str:continuous_stat".
Class: rlang_error/error/condition
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-style_xxx.R:76: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_header(stat_0 ~ "**N = xx**")
8. ├─gtsummary::modify_header(., stat_0 ~ "**N = xx**")
9. ├─gtreg::tbl_reg_summary(...)
10. │ ├─... %>% ...
11. │ └─gtsummary::with_gtsummary_theme(...)
12. │ └─gtsummary::set_gtsummary_theme(suppressMessages(x))
13. │ └─cli::cli_abort(...)
14. │ └─rlang::abort(...)
15. └─base::structure(...)
── Failure ('test-style_xxx.R:90:3'): style_xxx works with tbl_reg_summary ─────
`... <- NULL` threw an unexpected error.
Message: The following names of `x` are not accepted theme elemets: "tbl_summary-str:continuous_stat".
Class: rlang_error/error/condition
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-style_xxx.R:90: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_header(stat_0 ~ "**N = xx**")
8. ├─gtsummary::modify_header(., stat_0 ~ "**N = xx**")
9. ├─gtreg::tbl_reg_summary(...)
10. │ ├─... %>% ...
11. │ └─gtsummary::with_gtsummary_theme(...)
12. │ └─gtsummary::set_gtsummary_theme(suppressMessages(x))
13. │ └─cli::cli_abort(...)
14. │ └─rlang::abort(...)
15. └─base::structure(...)
── Error ('test-style_xxx.R:110:3'): style_xxx works with tbl_reg_summary ──────
Error in `eval(expr, envir, enclos)`: object 't4' not found
Backtrace:
▆
1. └─testthat::expect_snapshot(as.data.frame(t4)) at test-style_xxx.R:110:3
2. └─rlang::cnd_signal(state$error)
── Failure ('test-tbl_reg_summary.R:2:3'): tbl_reg_summary works ───────────────
``%>%`(...)` threw an unexpected error.
Message: The following names of `x` are not accepted theme elemets: "tbl_summary-str:continuous_stat".
Class: rlang_error/error/condition
Backtrace:
▆
1. ├─testthat::expect_error(...) at test-tbl_reg_summary.R:2: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. ├─df_patient_characteristics %>% ...
8. ├─gtreg::tbl_reg_summary(., by = trt, include = c(marker, status))
9. │ ├─... %>% ...
10. │ └─gtsummary::with_gtsummary_theme(...)
11. │ └─gtsummary::set_gtsummary_theme(suppressMessages(x))
12. │ └─cli::cli_abort(...)
13. │ └─rlang::abort(...)
14. └─base::structure(...)
── Error ('test-tbl_reg_summary.R:9:3'): tbl_reg_summary works ─────────────────
Error in `set_gtsummary_theme(suppressMessages(x))`: The following names of `x` are not accepted theme elemets: "tbl_summary-str:continuous_stat".
Backtrace:
▆
1. ├─testthat::expect_message(...) at test-tbl_reg_summary.R:9: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. ├─df_patient_characteristics %>% ...
8. ├─gtreg::tbl_reg_summary(., by = trt, include = c(marker, status))
9. │ ├─... %>% ...
10. │ └─gtsummary::with_gtsummary_theme(...)
11. │ └─gtsummary::set_gtsummary_theme(suppressMessages(x))
12. │ └─cli::cli_abort(...)
13. │ └─rlang::abort(...)
14. └─base::structure(...)
[ FAIL 11 | WARN 16 | SKIP 4 | PASS 65 ]
Error: Test failures
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [1s/2s] OK
- checking PDF version of manual ... [6s/8s] OK
- checking HTML version of manual ... [1s/2s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs