- using R version 4.6.1 (2026-06-24)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-16 (Debian 16.2.0-1) 16.2.0
GNU Fortran (Debian 16.2.0-1) 16.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
* current time: 2026-08-29 14:17:36 UTC
- checking for file ‘hcruR/DESCRIPTION’ ... OK
- this is package ‘hcruR’ version ‘1.0.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 whether package ‘hcruR’ 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 ... [2s/3s] OK
- checking whether the package can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the package can be unloaded cleanly ... [1s/2s] OK
- checking whether the namespace can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the namespace can be unloaded cleanly ... [2s/2s] OK
- checking loading without being on the library search path ... [2s/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 ... [9s/12s] OK
- checking Rd files ... [0s/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/0s] 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 ... [3s/3s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [10s/12s] ERROR
Running ‘testthat.R’ [10s/12s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(hcruR)
>
> test_check("hcruR")
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Saving _problems/test-estimate_hcru-20.R
Saving _problems/test-estimate_hcru-41.R
The following errors were returned during `add_p()`:
x For variable `var1` (`cohort`) and "estimate", "std.error", "parameter", "statistic", "conf.low", "conf.high", and "p.value" statistics: The package "broom" (>= 1.0.8) is required.
x For variable `var2` (`cohort`) and "estimate", "std.error", "parameter", "statistic", "conf.low", "conf.high", and "p.value" statistics: The package "broom" (>= 1.0.8) is required.
Saving _problems/test-utils-109.R
[ FAIL 3 | WARN 24 | SKIP 0 | PASS 36 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-estimate_hcru.R:20:3'): estimate_hcru returns expected output without gt_summary ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map(settings, function(setting) { df_setting <- dplyr::filter(data, .data[[group_var_by]] == setting) vars_this <- var_list if (setting != "IP") { vars_this <- setdiff(vars_this, c("LOS", "Readmission")) } cohort_sym <- rlang::sym(group_var_main) n_df <- dplyr::mutate(dplyr::count(dplyr::distinct(df_setting, .data[[patient_id_col]], .data[[group_var_main]]), .data[[group_var_main]], name = "n"), colname = paste0("stat_", dplyr::row_number()), header = glue::glue("{.data[[group_var_main]]}, N = {n}")) header_map <- stats::setNames(n_df$header, n_df$colname) tbl <- gtsummary::tbl_summary(data = df_setting, by = !!cohort_sym, include = gtsummary::all_of(vars_this), missing = "no", type = list(all_continuous() ~ "continuous2"), statistic = list(all_continuous() ~ c(Total = "{sum}", `Mean (SD)` = "{mean} ({sd})", `Median (IQR)` = "{median} ({p25}, {p75})", Q1 = "{p25}", Q3 = "{p75}", Range = "{min} - {max}"))) if (length(unique(df_setting[[group_var_main]])) > 1) { tbl <- if (!is.null(test)) { gtsummary::add_p(tbl, test = test) } else { gtsummary::add_p(tbl) } } tbl <- gtsummary::bold_labels(gtsummary::modify_caption(gtsummary::modify_header(tbl, update = header_map), glue::glue("**Summary Table**"))) })`: i In index: 1.
Caused by error:
! The `update` argument of `modify_header()` was deprecated in gtsummary 2.0.0 and is now defunct.
i Use `modify_header(...)` input instead. Dynamic dots allow for syntax like `modify_header(!!!list(...))`.
── Error ('test-estimate_hcru.R:41:3'): estimate_hcru returns both summaries when gt_output = TRUE ──
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map(settings, function(setting) { df_setting <- dplyr::filter(data, .data[[group_var_by]] == setting) vars_this <- var_list if (setting != "IP") { vars_this <- setdiff(vars_this, c("LOS", "Readmission")) } cohort_sym <- rlang::sym(group_var_main) n_df <- dplyr::mutate(dplyr::count(dplyr::distinct(df_setting, .data[[patient_id_col]], .data[[group_var_main]]), .data[[group_var_main]], name = "n"), colname = paste0("stat_", dplyr::row_number()), header = glue::glue("{.data[[group_var_main]]}, N = {n}")) header_map <- stats::setNames(n_df$header, n_df$colname) tbl <- gtsummary::tbl_summary(data = df_setting, by = !!cohort_sym, include = gtsummary::all_of(vars_this), missing = "no", type = list(all_continuous() ~ "continuous2"), statistic = list(all_continuous() ~ c(Total = "{sum}", `Mean (SD)` = "{mean} ({sd})", `Median (IQR)` = "{median} ({p25}, {p75})", Q1 = "{p25}", Q3 = "{p75}", Range = "{min} - {max}"))) if (length(unique(df_setting[[group_var_main]])) > 1) { tbl <- if (!is.null(test)) { gtsummary::add_p(tbl, test = test) } else { gtsummary::add_p(tbl) } } tbl <- gtsummary::bold_labels(gtsummary::modify_caption(gtsummary::modify_header(tbl, update = header_map), glue::glue("**Summary Table**"))) })`: i In index: 1.
Caused by error:
! The `update` argument of `modify_header()` was deprecated in gtsummary 2.0.0 and is now defunct.
i Use `modify_header(...)` input instead. Dynamic dots allow for syntax like `modify_header(!!!list(...))`.
── Error ('test-utils.R:101:3'): timeline filter works as expected ─────────────
<purrr_error_indexed/rlang_error/error/condition>
Error in `purrr::map(settings, function(setting) { df_setting <- dplyr::filter(data, .data[[group_var_by]] == setting) vars_this <- var_list if (setting != "IP") { vars_this <- setdiff(vars_this, c("LOS", "Readmission")) } cohort_sym <- rlang::sym(group_var_main) n_df <- dplyr::mutate(dplyr::count(dplyr::distinct(df_setting, .data[[patient_id_col]], .data[[group_var_main]]), .data[[group_var_main]], name = "n"), colname = paste0("stat_", dplyr::row_number()), header = glue::glue("{.data[[group_var_main]]}, N = {n}")) header_map <- stats::setNames(n_df$header, n_df$colname) tbl <- gtsummary::tbl_summary(data = df_setting, by = !!cohort_sym, include = gtsummary::all_of(vars_this), missing = "no", type = list(all_continuous() ~ "continuous2"), statistic = list(all_continuous() ~ c(Total = "{sum}", `Mean (SD)` = "{mean} ({sd})", `Median (IQR)` = "{median} ({p25}, {p75})", Q1 = "{p25}", Q3 = "{p75}", Range = "{min} - {max}"))) if (length(unique(df_setting[[group_var_main]])) > 1) { tbl <- if (!is.null(test)) { gtsummary::add_p(tbl, test = test) } else { gtsummary::add_p(tbl) } } tbl <- gtsummary::bold_labels(gtsummary::modify_caption(gtsummary::modify_header(tbl, update = header_map), glue::glue("**Summary Table**"))) })`: i In index: 1.
Caused by error:
! The `update` argument of `modify_header()` was deprecated in gtsummary 2.0.0 and is now defunct.
i Use `modify_header(...)` input instead. Dynamic dots allow for syntax like `modify_header(!!!list(...))`.
[ FAIL 3 | WARN 24 | SKIP 0 | PASS 36 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [6s/7s] ERROR
Error(s) in re-building vignettes:
...
--- re-building ‘hcruR.Rmd’ using rmarkdown
Quitting from hcruR.Rmd:30-57 [unnamed-chunk-2]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/purrr_error_indexed>
Error in `purrr::map()`:
ℹ In index: 1.
Caused by error:
! The `update` argument of `modify_header()` was deprecated in gtsummary
2.0.0 and is now defunct.
ℹ Use `modify_header(...)` input instead. Dynamic dots allow for syntax like
`modify_header(!!!list(...))`.
---
Backtrace:
▆
1. └─hcruR::estimate_hcru(...)
2. └─hcruR::summarize_descriptives_gt(...)
3. └─purrr::map(...)
4. └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
5. ├─purrr:::with_indexed_errors(...)
6. │ └─base::withCallingHandlers(...)
7. ├─purrr:::call_with_cleanup(...)
8. └─hcruR (local) .f(.x[[i]], ...)
9. ├─gtsummary::bold_labels(...)
10. ├─gtsummary::modify_caption(...)
11. └─gtsummary::modify_header(tbl, update = header_map)
12. └─gtsummary:::.deprecate_modify_update_and_quiet_args(...)
13. └─lifecycle::deprecate_stop(...)
14. └─lifecycle:::deprecate_stop0(msg)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'hcruR.Rmd' failed with diagnostics:
ℹ In index: 1.
Caused by error:
! The `update` argument of `modify_header()` was deprecated in gtsummary
2.0.0 and is now defunct.
ℹ Use `modify_header(...)` input instead. Dynamic dots allow for syntax like
`modify_header(!!!list(...))`.
--- failed re-building ‘hcruR.Rmd’
SUMMARY: processing the following file failed:
‘hcruR.Rmd’
Error: Vignette re-building failed.
Execution halted
- checking PDF version of manual ... [4s/6s] OK
- checking HTML version of manual ... [1s/1s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs