diff --git a/NAMESPACE b/NAMESPACE index 96bb07681..7ab91ef97 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -245,3 +245,4 @@ importFrom(dplyr,starts_with) importFrom(dplyr,vars) importFrom(dplyr,where) importFrom(glue,glue) +importFrom(glue,glue_data) diff --git a/NEWS.md b/NEWS.md index ae0a761f3..36940afee 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,17 +1,17 @@ # gtsummary (development version) -* Headers in {gt} tables being exported to PDF do not support the `\n` line breaker. Previously, line breakers were stripped from the header in the `print.gtsummary()` S3 method. But this did not apply to users utilizing `as_gt()` to further customize their tables. As a result, the line breaking strip has been migrated to `as_gt()`. (#1960) - -* Removed the `"tbl_summary-arg:statistic"` theme that was incorrectly added to `tbl_continuous()`. - * Made the `oneway.test()` available in `add_p.tbl_continuous()`. (#1970) -* Removed the deprecated `'aov'` test from the `tests.R` file listing available tests. (#1970) - * Added argument `tbl_ard_summary(overall)`. When `TRUE`, the ARD is parsed into primary ARD and the Overall ARD and we run `tbl_ard_summary() |> add_overall()`. (#1940) * Added `add_stat_label.tbl_ard_summary()` method. (#1969) +* Headers in {gt} tables being exported to PDF do not support the `\n` line breaker. Previously, line breakers were stripped from the header in the `print.gtsummary()` S3 method. But this did not apply to users utilizing `as_gt()` to further customize their tables. As a result, the line breaking strip has been migrated to `as_gt()`. (#1960) + +* Removed the `"tbl_summary-arg:statistic"` theme that was incorrectly added to `tbl_continuous()`. + +* Removed the deprecated `'aov'` test from the `tests.R` file listing available tests. (#1970) + * Removed documentation for the `add_overall.tbl_ard_summary(digits)` argument, which was never meant to be a part of this function. (#1975) # gtsummary 2.0.2 diff --git a/R/add_stat_label.R b/R/add_stat_label.R index b06741fd4..d256a78cc 100644 --- a/R/add_stat_label.R +++ b/R/add_stat_label.R @@ -155,13 +155,13 @@ add_stat_label.tbl_summary <- function(x, location = c("row", "column"), label = dplyr::mutate( row_type = "missing", stat_label = - glue::glue( - x$inputs$missing_stat, - .envir = list(N_obs = "N", - N_miss = "n", - N_nonmiss = "N - n", - p_miss = "p", - p_nonmiss = "1 - p") + glue::glue_data( + .x = list(N_obs = "N", + N_miss = "n", + N_nonmiss = "N - n", + p_miss = "p", + p_nonmiss = "1 - p"), + x$inputs$missing_stat ) ) ) diff --git a/R/brdg_summary.R b/R/brdg_summary.R index 198965cb8..ed51ee799 100644 --- a/R/brdg_summary.R +++ b/R/brdg_summary.R @@ -239,11 +239,11 @@ pier_summary_categorical <- function(cards, str_statistic_pre_glue, function(str_to_glue) { stat <- - glue::glue( - str_to_glue, - .envir = + glue::glue_data( + .x = cards::get_ard_statistics(df_variable_level_stats, .column = "stat_fmt") |> - c(lst_variable_stats) + c(lst_variable_stats), + str_to_glue ) |> as.character() } @@ -345,9 +345,9 @@ pier_summary_continuous2 <- function(cards, statistic[[.y$variable[1]]], function(str_to_glue) { stat <- - glue::glue( - str_to_glue, - .envir = cards::get_ard_statistics(.x, .column = "stat_fmt") + glue::glue_data( + .x = cards::get_ard_statistics(.x, .column = "stat_fmt"), + str_to_glue ) |> as.character() } @@ -358,9 +358,9 @@ pier_summary_continuous2 <- function(cards, statistic[[.y$variable[1]]], function(str_to_glue) { label <- - glue::glue( - str_to_glue, - .envir = cards::get_ard_statistics(.x, .column = "stat_label") + glue::glue_data( + .x = cards::get_ard_statistics(.x, .column = "stat_label"), + str_to_glue ) |> as.character() } @@ -453,9 +453,9 @@ pier_summary_continuous <- function(cards, dplyr::mutate( .data = .y, stat = - glue::glue( - statistic[[.data$variable[1]]], - .envir = cards::get_ard_statistics(.x, .column = "stat_fmt") + glue::glue_data( + .x = cards::get_ard_statistics(.x, .column = "stat_fmt"), + statistic[[.data$variable[1]]] ) |> as.character() ) diff --git a/R/gtsummary-package.R b/R/gtsummary-package.R index 963ebe979..4c8ae2e0f 100644 --- a/R/gtsummary-package.R +++ b/R/gtsummary-package.R @@ -1,7 +1,7 @@ #' @keywords internal #' @import rlang #' @importFrom dplyr across -#' @importFrom glue glue +#' @importFrom glue glue glue_data "_PACKAGE" ## usethis namespace: start diff --git a/R/tbl_uvregression.R b/R/tbl_uvregression.R index 1202588e6..15efddb3d 100644 --- a/R/tbl_uvregression.R +++ b/R/tbl_uvregression.R @@ -353,10 +353,10 @@ is_quo_empty <- function(x) { \(variable) { formula_i <- cards::eval_capture_conditions( - glue( - formula, - .envir = list(y = ifelse(is_empty(y), cardx::bt(variable), y), - x = ifelse(is_empty(x), cardx::bt(variable), x)) + glue_data( + .x = list(y = ifelse(is_empty(y), cardx::bt(variable), y), + x = ifelse(is_empty(x), cardx::bt(variable), x)), + formula ) |> stats::as.formula() ) diff --git a/tests/testthat/_snaps/tbl_continuous.md b/tests/testthat/_snaps/tbl_continuous.md index 2369d095f..2c534a7ea 100644 --- a/tests/testthat/_snaps/tbl_continuous.md +++ b/tests/testthat/_snaps/tbl_continuous.md @@ -90,7 +90,7 @@ Error in `tbl_continuous()`: ! Elements of the `label` argument must be strings. -# tbl_continuous(type,value) +# tbl_continuous(value) Code df <- as.data.frame(tbl_continuous(trial, variable = age, include = c(trt, @@ -121,7 +121,7 @@ 4 II 47 (34, 55) 49 (44, 58) 5 III 46 (38, 59) 50 (43, 58) -# tbl_continuous(type,value) messaging +# tbl_continuous(value) messaging Code tbl_continuous(trial, variable = age, include = c(trt, grade), value = trt ~ diff --git a/tests/testthat/test-add_ci.tbl_summary.R b/tests/testthat/test-add_ci.tbl_summary.R index 804589335..8305577be 100644 --- a/tests/testthat/test-add_ci.tbl_summary.R +++ b/tests/testthat/test-add_ci.tbl_summary.R @@ -53,8 +53,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilcox.test results @@ -70,8 +70,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson @@ -87,8 +87,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson.no.correct @@ -104,8 +104,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wald @@ -121,8 +121,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wald.no.correct @@ -138,8 +138,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check exact @@ -155,8 +155,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check agresti.coull @@ -172,8 +172,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check jeffreys @@ -189,8 +189,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) }) @@ -247,8 +247,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilcox.test results @@ -265,8 +265,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson @@ -283,8 +283,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson.no.correct @@ -301,8 +301,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check exact @@ -319,8 +319,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check agresti.coull @@ -337,8 +337,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check jeffreys @@ -355,8 +355,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) }) @@ -413,8 +413,8 @@ test_that("add_ci(method) after `add_overall()`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilcox.test results @@ -430,8 +430,8 @@ test_that("add_ci(method) after `add_overall()`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson @@ -447,8 +447,8 @@ test_that("add_ci(method) after `add_overall()`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson.no.correct @@ -464,8 +464,8 @@ test_that("add_ci(method) after `add_overall()`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check exact @@ -481,8 +481,8 @@ test_that("add_ci(method) after `add_overall()`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check agresti.coull @@ -498,8 +498,8 @@ test_that("add_ci(method) after `add_overall()`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check jeffreys @@ -515,8 +515,8 @@ test_that("add_ci(method) after `add_overall()`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) }) @@ -613,8 +613,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilcox.test results @@ -630,8 +630,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson @@ -647,8 +647,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check wilson.no.correct @@ -664,8 +664,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check exact @@ -681,8 +681,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check agresti.coull @@ -698,8 +698,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check jeffreys @@ -715,8 +715,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) }) diff --git a/tests/testthat/test-add_ci.tbl_svysummary.R b/tests/testthat/test-add_ci.tbl_svysummary.R index da8abd394..37082c57f 100644 --- a/tests/testthat/test-add_ci.tbl_svysummary.R +++ b/tests/testthat/test-add_ci.tbl_svysummary.R @@ -67,8 +67,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.mean results @@ -84,8 +84,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) @@ -102,8 +102,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.xlogit results @@ -119,8 +119,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.asin results @@ -136,8 +136,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.score results @@ -153,8 +153,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.logit @@ -170,8 +170,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.logit @@ -187,8 +187,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.likelihood @@ -204,8 +204,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.asin @@ -221,8 +221,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.beta @@ -238,8 +238,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.mean @@ -255,8 +255,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.xlogit @@ -272,8 +272,8 @@ test_that("add_ci(method) with no `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) }) @@ -344,8 +344,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.mean results @@ -362,8 +362,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) @@ -381,8 +381,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.xlogit results @@ -399,8 +399,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.asin results @@ -417,8 +417,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svymedian.score results @@ -435,8 +435,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.logit @@ -453,8 +453,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.logit @@ -471,8 +471,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.likelihood @@ -489,8 +489,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.asin @@ -507,8 +507,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.beta @@ -525,8 +525,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.mean @@ -543,8 +543,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) # check svyprop.xlogit @@ -561,8 +561,8 @@ test_that("add_ci(method) with `by`", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) }) @@ -641,8 +641,8 @@ test_that("add_ci(conf.level)", { ) ) |> cards::apply_fmt_fn() |> - cards::get_ard_statistics(.column = "stat_fmt") %>% - {glue("{conf.low}, {conf.high}", .envir = .)} # styler: off + cards::get_ard_statistics(.column = "stat_fmt") |> + glue_data("{conf.low}, {conf.high}") ) })