Skip to content

Commit d353da1

Browse files
committed
releases prep
1 parent bf05dc6 commit d353da1

11 files changed

+31
-73
lines changed

DESCRIPTION

+2-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ BugReports: https://github.com/ddsjoberg/gtsummary/issues
4747
Depends:
4848
R (>= 4.2)
4949
Imports:
50-
cards (>= 0.5.1.9012),
50+
cards (>= 0.6.0),
5151
cli (>= 3.6.3),
5252
dplyr (>= 1.1.3),
5353
glue (>= 1.8.0),
@@ -62,7 +62,7 @@ Suggests:
6262
broom.helpers (>= 1.17.0),
6363
broom.mixed (>= 0.2.9),
6464
car (>= 3.0-11),
65-
cardx (>= 0.2.3.9009),
65+
cardx (>= 0.2.4),
6666
cmprsk,
6767
effectsize (>= 0.6.0),
6868
emmeans (>= 1.7.3),
@@ -88,7 +88,6 @@ Suggests:
8888
testthat (>= 3.2.0),
8989
withr (>= 2.5.0),
9090
workflows (>= 0.2.4)
91-
Remotes: insightsengineering/cards, insightsengineering/cardx
9291
VignetteBuilder:
9392
knitr
9493
Config/Needs/check: hms

NEWS.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
# gtsummary (development version)
22

3-
* Fixed a bug in `tbl_hierarchical()` where the `group*` variables of the resulting `table_body` were not fully populated. (#2192)
3+
### New Features and Functions
44

55
* Added function `modify_post_fmt_fun()` to perform formatting on cells after the primary formatting function has been applied. The functionality is similar to `gt::text_transform()`. (#2014)
66

77
* Data pre-processing has now been re-introduced for calculations in `add_p()` and `add_difference()`. Data pre-processing steps were removed in the v2.0 release; however, in some cases---particularly `add_difference()` for dichotomous variables---the reduced functionality was affecting the user experience. See `?tests` for details on data pre-processing. (#2165)
88

9-
* The `add_variable_group_header()` function has been generalized to work with gtsummary tables, where previously only `'tbl_summary'` were accepted. (#2197)
9+
* The `add_variable_group_header()` function has been generalized to work with any gtsummary table, where previously only `'tbl_summary'` were accepted. (#2197)
1010

1111
* The footnote placed on the p-value column by `add_significance_stars()` no longer replaces any existing footnote. Rather the footnote is added to any existing footnote. (#2184)
1212

13-
* Fixed bug in `tbl_cross()` when a column was named `'missing'`. (#2182)
13+
* The `remove_*()` family of functions default argument values have been updated to remove _all_ footnotes, source notes, abbreviations, column merging, bold and italic styling by default, so the users are not longer required to remove, for example, one source note at a time. The one exception is `remove_spanning_headers()`, which will remove the first level spanning headers be default. (#2161)
1414

15-
* Corrected bug causing an error in `tbl_hierarchical()` when more than one `by` variable level had been filtered out of the data. (#2173)
15+
* Added a new theme element `tbl_svysummary-arg:missing_stat`
1616

17-
* The `remove_*()` family of functions default argument values have been updated to remove _all_ footnotes, source notes, abbreviations, column merging, bold and italic styling by default, so the users are not longer required to remove, for example, one source note at a time. The one exception is `remove_spanning_headers()`, which will remove the first level spanning headers be default. (#2161)
17+
* Added functions `sort_hierarchical()` and `filter_hierarchical()` to sort and filter hierarchical tables. (#2096)
18+
19+
### Bug Fixes
1820

19-
* The `tbl_strata_nested_stack(quiet)` argument documentation was updated. (#2164)
21+
* Fixed a bug in `tbl_hierarchical()` where the `group*` variables of the resulting `table_body` were not fully populated. (#2192)
22+
23+
* Corrected bug causing an error in `tbl_hierarchical()` when more than one `by` variable level had been filtered out of the data. (#2173)
2024

2125
* Corrected the class of objects returned from `tbl_strata_nested_stack()`.
2226

23-
* Corrected bug in `tbl_strata_nested_stack()` when the strata variable had a single level. Pervasively, the indentation of the single strata level was not correct.
27+
* Corrected bug in `tbl_strata_nested_stack()` when the strata variable had a single level. Previously, the indentation of the single strata level was not correct.
2428

25-
* Fix in theme element `tbl_summary-arg:missing_stat` that was not being applied. (#2176)
29+
* Fix in `tbl_strata_nested_stack()` when there are unobserved combinations of strata levels. (#2179)
2630

27-
* Added a new theme element `tbl_svysummary-arg:missing_stat`
31+
* Fixed bug in `tbl_cross()` when a column was named `'missing'`. (#2182)
32+
33+
* Fix in theme element `tbl_summary-arg:missing_stat` that was not being applied. (#2176)
2834

2935
* Corrected bug in `tbl_likert()` where variables in table always appeared in alphabetical order. (#2195)
3036

3137
* Corrected bug in `add_n.tbl_likert()` where the Ns were not formatted with `style_number()`. (#2195)
3238

33-
* Fix in `tbl_strata_nested_stack()` when there are unobserved combinations of strata levels. (#2179)
34-
35-
* Added functions `sort_hierarchical()` and `filter_hierarchical()` to sort and filter hierarchical tables. (#2096)
36-
3739
# gtsummary 2.1.0
3840

3941
### New Features and Functions

R/as_flex_table.R

-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ as_flex_table <- function(x, include = everything(), return_calls = FALSE, ...)
3434

3535
# deprecated arguments -------------------------------------------------------
3636
dots <- rlang::dots_list(...)
37-
if (!is.null(dots$strip_md_bold)) {
38-
lifecycle::deprecate_stop("1.6.0", "gtsummary::as_flex_table(strip_md_bold=)")
39-
}
4037

4138
# process inputs -------------------------------------------------------------
4239
check_class(x, "gtsummary")

R/as_hux_table.R

+1-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#' @inheritParams huxtable::quick_xlsx
1515
#' @param bold_header_rows (scalar `logical`)\cr
1616
#' logical indicating whether to bold header rows. Default is `TRUE`
17-
#' @param strip_md_bold `r lifecycle::badge("deprecated")`
1817
#'
1918
#' @name as_hux_table
2019
#' @return A \{huxtable\} object
@@ -29,19 +28,12 @@ NULL
2928

3029
#' @export
3130
#' @rdname as_hux_table
32-
as_hux_table <- function(x, include = everything(), return_calls = FALSE,
33-
strip_md_bold = FALSE) {
31+
as_hux_table <- function(x, include = everything(), return_calls = FALSE) {
3432
set_cli_abort_call()
3533
check_class(x, "gtsummary")
3634
check_pkg_installed("huxtable")
3735
check_scalar_logical(return_calls)
3836

39-
if (!isFALSE(strip_md_bold)) {
40-
lifecycle::deprecate_stop(
41-
"1.6.0", "gtsummary::as_hux_table(strip_md_bold=)",
42-
details = "Markdown syntax is now recognized by the {huxtable} package."
43-
)
44-
}
4537
# running pre-conversion function, if present --------------------------------
4638
x <- do.call(get_theme_element("pkgwide-fun:pre_conversion", default = identity), list(x))
4739

R/as_kable.R

-7
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ as_kable <- function(x, ..., include = everything(), return_calls = FALSE) {
6464
table_styling_to_kable_calls <- function(x, ...) {
6565
dots <- rlang::enexprs(...)
6666

67-
if (!is.null(dots[["fmt_missing"]])) {
68-
lifecycle::deprecate_stop(
69-
when = "1.6.0",
70-
what = "gtsummary::as_kable_extra(fmt_missing=)"
71-
)
72-
}
73-
7467
kable_calls <-
7568
table_styling_to_tibble_calls(x, col_labels = FALSE, fmt_missing = TRUE)
7669

R/as_kable_extra.R

-15
Original file line numberDiff line numberDiff line change
@@ -151,24 +151,9 @@ as_kable_extra <- function(x,
151151
}
152152

153153

154-
155-
156154
table_styling_to_kable_extra_calls <- function(x, escape, format, addtl_fmt, ...) {
157155
dots <- rlang::dots_list(...)
158156

159-
if (!is.null(dots[["strip_md_bold"]])) {
160-
lifecycle::deprecate_warn(
161-
when = "1.6.0",
162-
what = "gtsummary::as_kable_extra(strip_md_bold=)"
163-
)
164-
}
165-
if (!is.null(dots[["fmt_missing"]])) {
166-
lifecycle::deprecate_stop(
167-
when = "1.6.0",
168-
what = "gtsummary::as_kable_extra(fmt_missing=)"
169-
)
170-
}
171-
172157
# if escape is FALSE and latex output, convert markdown to latex and add linebreaks
173158
if (!isTRUE(escape) && isTRUE(addtl_fmt) && isTRUE(format == "latex")) {
174159
x <- .latex_conversion_and_escaping(x)

R/deprecated.R

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
NULL
1010

1111
# "soft" deprecation for 6 months: (Sys.Date() - lubridate::dmonths(6)) |> as.Date()
12-
# v2.1.0 2025-02-19
13-
# v2.0.2 2024-09-05
14-
# v2.0.1 2024-08-01
15-
# v2.0.0 2024-07-23
12+
# v2.2.0 2025-04-11
13+
# v2.1.0 2025-02-19
14+
# v2.0.2 2024-09-05
15+
# v2.0.1 2024-08-01
1616

1717
# "warn" deprecation for 18 months: (Sys.Date() - lubridate::dmonths(24)) |> as.Date()
18+
# v2.0.0 2024-07-23
1819
# v1.7.2 2023-07-13
19-
# v1.7.1 2023-04-27
2020

2121
# "stop" deprecation for 12 months: (Sys.Date() - lubridate::dmonths(36)) |> as.Date()
22+
# v1.7.1 2023-04-27
2223
# v1.7.0 2023-01-13
2324
# v1.6.3 2022-12-06
2425
# v1.6.2 2022-09-30
2526
# v1.6.1 2022-06-22
26-
# v1.6.0 2022-04-25
2727

2828

2929
# v1.6.1 ----------------------------------------------------------

R/tbl_strata_nested_stack.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ tbl_strata_nested_stack <- function(data, strata, .tbl_fun, ..., row_header = "{
104104
dplyr::mutate(
105105
strata = .data$variable_level |> unlist(),
106106
"{strata[i]}_strata" := glue::glue(row_header)
107-
) |>
107+
) %>%
108+
structure(., class = c("card", class(.))) |>
108109
cards::rename_ard_columns() |>
109110
dplyr::select(any_of(strata), all_of(glue::glue("{strata[i]}_strata")))
110111
}

cran-comments.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ We checked 23 reverse dependencies, comparing R CMD check results across CRAN an
99
* We saw 0 new problems
1010
* We failed to check 2 packages
1111

12+
Issues with CRAN packages are summarised below.
13+
1214
### Failed to check
1315

14-
* brms.mmrm
15-
* equatiomatic
16+
* brms.mmrm
17+
* equatiomatic
1618

1719
## Additional Comments
1820

man/as_hux_table.Rd

+1-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-as_hux_table.R

-6
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ test_that("as_hux_table passes missing symbols correctly", {
252252
)
253253
})
254254

255-
test_that("as_hux_table(strip_md_bold) causes defunct error", {
256-
lifecycle::expect_defunct(
257-
my_tbl_summary |> as_hux_table(strip_md_bold = TRUE)
258-
)
259-
})
260-
261255
# as_hux_xlsx ----
262256

263257
test_that("as_hux_xlsx works with standard use", {

0 commit comments

Comments
 (0)