Skip to content

Commit

Permalink
deprecation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg committed Feb 18, 2025
1 parent 8ffb305 commit 730f64b
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ Updates to address regressions in the v2.0.0 release:

* Added a standardized mean difference method for `tbl_svysummary()` tables.

* Added `tbl_strata(.stack_group_header=)` argument to include/exclude the headers when tables are combined with `tbl_stack()`
* Added `tbl_strata(.stack_group_header=)` argument to include/exclude the headers when tables are combined with `tbl_stack()`.

* Added `tbl_strata(.quiet=)` argument.

Expand Down
3 changes: 0 additions & 3 deletions R/tbl_strata.R
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ tbl_strata <- function(data,
.combine_args = NULL,
.header =
ifelse(.combine_with == "tbl_merge", "**{strata}**", "{strata}"),
.stack_group_header = NULL,
.quiet = NULL) {
set_cli_abort_call()

Expand All @@ -127,7 +126,6 @@ tbl_strata <- function(data,
.combine_with = .combine_with,
.combine_args = .combine_args,
.header = .header,
.stack_group_header = .stack_group_header,
.parent_fun = "tbl_strata"
)
}
Expand Down Expand Up @@ -169,7 +167,6 @@ tbl_strata2 <- function(data,
.combine_with = .combine_with,
.combine_args = .combine_args,
.header = .header,
.stack_group_header = .stack_group_header,
.parent_fun = "tbl_strata2"
)
}
Expand Down
4 changes: 0 additions & 4 deletions man/tbl_strata.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 0 additions & 17 deletions tests/testthat/test-tbl_strata.R
Original file line number Diff line number Diff line change
Expand Up @@ -228,23 +228,6 @@ test_that("tbl_strata2 works with standard use", {
expect_equal(length(tbl$tbls), 3)
})

test_that("tbl_strata(.stack_group_header) produces defunct warning", {
lifecycle::expect_defunct(
trial |>
select(grade, stage, trt) |>
mutate(grade = paste("Grade", grade)) |>
tbl_strata(
strata = grade,
.tbl_fun =
~ .x |>
tbl_summary(by = trt) |>
add_p(),
.combine_with = "tbl_stack",
.stack_group_header = TRUE
)
)
})

test_that("tbl_strata(.quiet) produces deprecation warning", {
lifecycle::expect_deprecated(
trial |>
Expand Down

0 comments on commit 730f64b

Please sign in to comment.