From dfaa310e554b6f18bd36c6ecb822ec230b7f2d16 Mon Sep 17 00:00:00 2001 From: Emily de la Rua <59304861+edelarua@users.noreply.github.com> Date: Fri, 6 Sep 2024 17:39:39 -0400 Subject: [PATCH 1/3] Finalize deprecation of <0.9.4 arguments (#1304) Fixes #1303 --- NEWS.md | 1 + R/argument_convention.R | 4 ---- R/g_forest.R | 10 +++++----- R/g_lineplot.R | 16 +--------------- R/h_km.R | 2 +- R/h_response_biomarkers_subgroups.R | 4 ++-- R/h_response_subgroups.R | 2 +- R/h_survival_biomarkers_subgroups.R | 2 +- R/h_survival_duration_subgroups.R | 2 +- R/response_biomarkers_subgroups.R | 2 +- R/response_subgroups.R | 2 +- R/survival_biomarkers_subgroups.R | 2 +- R/survival_coxph_pairwise.R | 2 +- R/survival_duration_subgroups.R | 2 +- R/utils_default_stats_formats_labels.R | 4 ++-- man/argument_convention.Rd | 5 ----- man/control_lineplot_vars.Rd | 8 +------- tests/testthat/test-g_lineplot.R | 3 --- 18 files changed, 21 insertions(+), 52 deletions(-) diff --git a/NEWS.md b/NEWS.md index 11daaa6079..bd3afce96a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,6 +20,7 @@ ### Miscellaneous * Began deprecation of the confusing functions `summary_formats` and `summary_labels`. * Enhanced general descriptions of analyze and summarize functions throughout package documentation. +* Finalized deprecation of the `strata` and `cohort_id` arguments to `g_lineplot`. # tern 0.9.5 diff --git a/R/argument_convention.R b/R/argument_convention.R index 34c92b7786..e2b64b31c1 100644 --- a/R/argument_convention.R +++ b/R/argument_convention.R @@ -31,7 +31,6 @@ #' @param conf_level (`proportion`)\cr confidence level of the interval. #' @param data (`data.frame`)\cr the dataset containing the variables to summarize. #' @param df (`data.frame`)\cr data set containing all analysis variables. -#' @param draw (`flag`)\cr whether the plot should be drawn. #' @param groups_lists (named `list` of `list`)\cr optionally contains for each `subgroups` variable a #' list, which specifies the new group levels via the names and the #' levels that belong to it in the character vectors that are elements of the list. @@ -49,8 +48,6 @@ #' @param nested (`flag`)\cr whether this layout instruction should be applied within the existing layout structure _if #' possible (`TRUE`, the default) or as a new top-level element (`FALSE`). Ignored if it would nest a split. #' underneath analyses, which is not allowed. -#' @param newpage (`flag`)\cr whether the plot should be drawn on a new page. -#' Only considered if `draw = TRUE` is used. #' @param prune_zero_rows (`flag`)\cr whether to prune all zero rows. #' @param riskdiff (`flag`)\cr whether a risk difference column is present. When set to `TRUE`, [add_riskdiff()] must be #' used as `split_fun` in the prior column split of the table layout, specifying which columns should be compared. @@ -72,7 +69,6 @@ #' @param ylim (`numeric(2)`)\cr vector containing lower and upper limits for the y-axis, respectively. #' If `NULL` (default), the default scale range is used. #' -#' #' @details Although this function just returns `NULL` it has two uses, for #' the `tern` users it provides a documentation of arguments that are #' commonly and consistently used in the framework. For the developer it adds a diff --git a/R/g_forest.R b/R/g_forest.R index 35c2844f0e..b1709ea88e 100644 --- a/R/g_forest.R +++ b/R/g_forest.R @@ -182,19 +182,19 @@ g_forest <- function(tbl, # Deprecated argument warnings if (lifecycle::is_present(width_row_names)) { lifecycle::deprecate_warn( - "0.9.3", "g_forest(width_row_names)", "g_forest(lbl_col_padding)", + "0.9.4", "g_forest(width_row_names)", "g_forest(lbl_col_padding)", details = "The width of the row label column can be adjusted via the `lbl_col_padding` parameter." ) } if (lifecycle::is_present(width_forest)) { lifecycle::deprecate_warn( - "0.9.3", "g_forest(width_forest)", "g_forest(rel_width_forest)", + "0.9.4", "g_forest(width_forest)", "g_forest(rel_width_forest)", details = "Relative width of the forest plot (as a proportion) can be set via the `rel_width_forest` parameter." ) } if (lifecycle::is_present(gp)) { lifecycle::deprecate_warn( - "0.9.3", "g_forest(gp)", "g_forest(ggtheme)", + "0.9.4", "g_forest(gp)", "g_forest(ggtheme)", details = paste( "`g_forest` is now generated as a `ggplot` object.", "Additional display settings should be supplied via the `ggtheme` parameter." @@ -203,13 +203,13 @@ g_forest <- function(tbl, } if (lifecycle::is_present(draw)) { lifecycle::deprecate_warn( - "0.9.3", "g_forest(draw)", + "0.9.4", "g_forest(draw)", details = "`g_forest` now generates `ggplot` objects. This parameter has no effect." ) } if (lifecycle::is_present(newpage)) { lifecycle::deprecate_warn( - "0.9.3", "g_forest(newpage)", + "0.9.4", "g_forest(newpage)", details = "`g_forest` now generates `ggplot` objects. This parameter has no effect." ) } diff --git a/R/g_lineplot.R b/R/g_lineplot.R index a234e835b3..82589e18ed 100644 --- a/R/g_lineplot.R +++ b/R/g_lineplot.R @@ -548,9 +548,7 @@ h_format_row <- function(x, format, labels = NULL) { #' @param x (`string`)\cr x-variable name. #' @param y (`string`)\cr y-variable name. #' @param group_var (`string` or `NA`)\cr group variable name. -#' @param strata `r lifecycle::badge("deprecated")` use the `group_var` parameter instead. #' @param subject_var (`string` or `NA`)\cr subject variable name. -#' @param cohort_id `r lifecycle::badge("deprecated")` use the `subject_var` parameter instead. #' @param facet_var (`string` or `NA`)\cr faceting variable name. #' @param paramcd (`string` or `NA`)\cr parameter code variable name. #' @param y_unit (`string` or `NA`)\cr y-axis unit variable name. @@ -568,19 +566,7 @@ control_lineplot_vars <- function(x = "AVISIT", facet_var = NA, paramcd = "PARAMCD", y_unit = "AVALU", - subject_var = "USUBJID", - strata = lifecycle::deprecated(), - cohort_id = lifecycle::deprecated()) { - if (lifecycle::is_present(strata)) { - lifecycle::deprecate_warn("0.9.2", "control_lineplot_vars(strata)", "control_lineplot_vars(group_var)") - group_var <- strata - } - - if (lifecycle::is_present(cohort_id)) { - lifecycle::deprecate_warn("0.9.2", "control_lineplot_vars(cohort_id)", "control_lineplot_vars(subject_id)") - subject_id <- cohort_id - } - + subject_var = "USUBJID") { checkmate::assert_string(x) checkmate::assert_string(y) checkmate::assert_string(group_var, na.ok = TRUE, null.ok = TRUE) diff --git a/R/h_km.R b/R/h_km.R index e038f3fa5a..bc7dd6b06d 100644 --- a/R/h_km.R +++ b/R/h_km.R @@ -188,7 +188,7 @@ h_tbl_coxph_pairwise <- function(df, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `h_tbl_coxph_pairwise() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/h_response_biomarkers_subgroups.R b/R/h_response_biomarkers_subgroups.R index 43088f2200..706bf247c0 100644 --- a/R/h_response_biomarkers_subgroups.R +++ b/R/h_response_biomarkers_subgroups.R @@ -49,7 +49,7 @@ h_rsp_to_logistic_variables <- function(variables, biomarker) { if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `h_rsp_to_logistic_variables() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] @@ -106,7 +106,7 @@ h_logistic_mult_cont_df <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `h_logistic_mult_cont_df() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/h_response_subgroups.R b/R/h_response_subgroups.R index 173ef292c0..9d968fdf13 100644 --- a/R/h_response_subgroups.R +++ b/R/h_response_subgroups.R @@ -328,7 +328,7 @@ h_odds_ratio_subgroups_df <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `h_odds_ratio_subgroups_df() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/h_survival_biomarkers_subgroups.R b/R/h_survival_biomarkers_subgroups.R index 9f9de3f34d..cb5519b0c9 100644 --- a/R/h_survival_biomarkers_subgroups.R +++ b/R/h_survival_biomarkers_subgroups.R @@ -110,7 +110,7 @@ h_coxreg_mult_cont_df <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `h_coxreg_mult_cont_df() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/h_survival_duration_subgroups.R b/R/h_survival_duration_subgroups.R index 69ac0c62f0..fcc6680e9a 100644 --- a/R/h_survival_duration_subgroups.R +++ b/R/h_survival_duration_subgroups.R @@ -335,7 +335,7 @@ h_coxph_subgroups_df <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `h_coxph_subgroups_df() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/response_biomarkers_subgroups.R b/R/response_biomarkers_subgroups.R index 360432998b..b18ad598ae 100644 --- a/R/response_biomarkers_subgroups.R +++ b/R/response_biomarkers_subgroups.R @@ -195,7 +195,7 @@ extract_rsp_biomarkers <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `extract_rsp_biomarkers() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/response_subgroups.R b/R/response_subgroups.R index c7c61d4b94..d80924d4e4 100644 --- a/R/response_subgroups.R +++ b/R/response_subgroups.R @@ -99,7 +99,7 @@ extract_rsp_subgroups <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `extract_rsp_subgroups() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/survival_biomarkers_subgroups.R b/R/survival_biomarkers_subgroups.R index c527f0209e..72cffb2334 100644 --- a/R/survival_biomarkers_subgroups.R +++ b/R/survival_biomarkers_subgroups.R @@ -116,7 +116,7 @@ extract_survival_biomarkers <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `extract_survival_biomarkers() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/survival_coxph_pairwise.R b/R/survival_coxph_pairwise.R index 4495962290..88ec24b68e 100644 --- a/R/survival_coxph_pairwise.R +++ b/R/survival_coxph_pairwise.R @@ -47,7 +47,7 @@ s_coxph_pairwise <- function(df, strat = lifecycle::deprecated(), control = control_coxph()) { if (lifecycle::is_present(strat)) { - lifecycle::deprecate_warn("0.9.3", "s_coxph_pairwise(strat)", "s_coxph_pairwise(strata)") + lifecycle::deprecate_warn("0.9.4", "s_coxph_pairwise(strat)", "s_coxph_pairwise(strata)") strata <- strat } diff --git a/R/survival_duration_subgroups.R b/R/survival_duration_subgroups.R index 90fc9b2376..eab7e46b9b 100644 --- a/R/survival_duration_subgroups.R +++ b/R/survival_duration_subgroups.R @@ -123,7 +123,7 @@ extract_survival_subgroups <- function(variables, if ("strat" %in% names(variables)) { warning( "Warning: the `strat` element name of the `variables` list argument to `extract_survival_subgroups() ", - "was deprecated in tern 0.9.3.\n ", + "was deprecated in tern 0.9.4.\n ", "Please use the name `strata` instead of `strat` in the `variables` argument." ) variables[["strata"]] <- variables[["strat"]] diff --git a/R/utils_default_stats_formats_labels.R b/R/utils_default_stats_formats_labels.R index 34cc8937a1..fc11ce3fed 100644 --- a/R/utils_default_stats_formats_labels.R +++ b/R/utils_default_stats_formats_labels.R @@ -514,7 +514,7 @@ tern_default_labels <- c( #' @export summary_formats <- function(type = "numeric", include_pval = FALSE) { lifecycle::deprecate_warn( - "0.9.5.9005", "summary_formats()", + "0.9.6", "summary_formats()", details = 'Use get_formats_from_stats(get_stats("analyze_vars_numeric", add_pval = include_pval)) instead' ) met_grp <- paste0(c("analyze_vars", type), collapse = "_") @@ -537,7 +537,7 @@ summary_formats <- function(type = "numeric", include_pval = FALSE) { #' @export summary_labels <- function(type = "numeric", include_pval = FALSE) { lifecycle::deprecate_warn( - "0.9.5.9005", "summary_formats()", + "0.9.6", "summary_formats()", details = 'Use get_labels_from_stats(get_stats("analyze_vars_numeric", add_pval = include_pval)) instead' ) met_grp <- paste0(c("analyze_vars", type), collapse = "_") diff --git a/man/argument_convention.Rd b/man/argument_convention.Rd index 7b13f98616..775937acba 100644 --- a/man/argument_convention.Rd +++ b/man/argument_convention.Rd @@ -51,8 +51,6 @@ that constitute the split. A custom label can be set for this level via the \cod \item{df}{(\code{data.frame})\cr data set containing all analysis variables.} -\item{draw}{(\code{flag})\cr whether the plot should be drawn.} - \item{groups_lists}{(named \code{list} of \code{list})\cr optionally contains for each \code{subgroups} variable a list, which specifies the new group levels via the names and the levels that belong to it in the character vectors that are elements of the list.} @@ -80,9 +78,6 @@ two proportions. For options, see \code{\link[=test_proportion_diff]{test_propor possible (\code{TRUE}, the default) or as a new top-level element (\code{FALSE}). Ignored if it would nest a split. underneath analyses, which is not allowed.} -\item{newpage}{(\code{flag})\cr whether the plot should be drawn on a new page. -Only considered if \code{draw = TRUE} is used.} - \item{prune_zero_rows}{(\code{flag})\cr whether to prune all zero rows.} \item{riskdiff}{(\code{flag})\cr whether a risk difference column is present. When set to \code{TRUE}, \code{\link[=add_riskdiff]{add_riskdiff()}} must be diff --git a/man/control_lineplot_vars.Rd b/man/control_lineplot_vars.Rd index cf52768f5e..33dd7b3838 100644 --- a/man/control_lineplot_vars.Rd +++ b/man/control_lineplot_vars.Rd @@ -11,9 +11,7 @@ control_lineplot_vars( facet_var = NA, paramcd = "PARAMCD", y_unit = "AVALU", - subject_var = "USUBJID", - strata = lifecycle::deprecated(), - cohort_id = lifecycle::deprecated() + subject_var = "USUBJID" ) } \arguments{ @@ -30,10 +28,6 @@ control_lineplot_vars( \item{y_unit}{(\code{string} or \code{NA})\cr y-axis unit variable name.} \item{subject_var}{(\code{string} or \code{NA})\cr subject variable name.} - -\item{strata}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} use the \code{group_var} parameter instead.} - -\item{cohort_id}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} use the \code{subject_var} parameter instead.} } \value{ A named character vector of variable names. diff --git a/tests/testthat/test-g_lineplot.R b/tests/testthat/test-g_lineplot.R index 15b2b264c4..4ef5d541f1 100644 --- a/tests/testthat/test-g_lineplot.R +++ b/tests/testthat/test-g_lineplot.R @@ -138,9 +138,6 @@ testthat::test_that("g_lineplot xticks, xlim, and ylim arguments work", { testthat::test_that("control_lineplot_vars works", { testthat::expect_silent(control_lineplot_vars(group_var = NA)) - - # Deprecation warnings work - lifecycle::expect_deprecated(lifecycle::expect_deprecated(control_lineplot_vars(strata = NA, cohort_id = NA))) }) testthat::test_that("g_lineplot works with no strata (group_var) and allows points when only one strata is provided", { From 12bfafc144ea2d78533c4f66272e48530fdaef89 Mon Sep 17 00:00:00 2001 From: edelarua Date: Fri, 6 Sep 2024 21:40:54 +0000 Subject: [PATCH 2/3] [skip actions] Bump version to 0.9.5.9021 --- DESCRIPTION | 4 ++-- NEWS.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bb68293602..ba1d80aae2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: tern Title: Create Common TLGs Used in Clinical Trials -Version: 0.9.5.9020 -Date: 2024-09-05 +Version: 0.9.5.9021 +Date: 2024-09-06 Authors@R: c( person("Joe", "Zhu", , "joe.zhu@roche.com", role = c("aut", "cre")), person("Daniel", "Sabanés Bové", , "daniel.sabanes_bove@roche.com", role = "aut"), diff --git a/NEWS.md b/NEWS.md index bd3afce96a..63d4ee5c43 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# tern 0.9.5.9020 +# tern 0.9.5.9021 ### Enhancements * Added `errorbar_width` and `linetype` parameters to `g_lineplot`. * Reworking of `summarize_glm_count()` documentation and all its associated functions to better describe the results and the functions' purpose. From 3bc7d426189d96b26adecc2eaade354b214e6061 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:47:13 +0000 Subject: [PATCH 3/3] [skip style] [skip vbump] Restyle files --- R/survival_time.R | 41 +++++++++++++++----------- R/utils_default_stats_formats_labels.R | 8 ++--- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/R/survival_time.R b/R/survival_time.R index 3555bd17d8..153263d393 100644 --- a/R/survival_time.R +++ b/R/survival_time.R @@ -76,14 +76,16 @@ s_surv_time <- function(df, range_event <- range_noinf(df[[.var]][df[[is_event]]], na.rm = TRUE) range <- range_noinf(df[[.var]], na.rm = TRUE) - names(quantiles) <- as.character(100*quantiles) + names(quantiles) <- as.character(100 * quantiles) srv_qt_tab_pre <- unlist(srv_qt_tab_pre) - srv_qt_ci <- lapply(quantiles, function(x){ - name <- as.character(100*x) + srv_qt_ci <- lapply(quantiles, function(x) { + name <- as.character(100 * x) - c(srv_qt_tab_pre[[paste0("quantile.",name)]], - srv_qt_tab_pre[[paste0("lower.",name)]], - srv_qt_tab_pre[[paste0("upper.",name)]]) + c( + srv_qt_tab_pre[[paste0("quantile.", name)]], + srv_qt_tab_pre[[paste0("lower.", name)]], + srv_qt_tab_pre[[paste0("upper.", name)]] + ) }) list( @@ -97,15 +99,16 @@ s_surv_time <- function(df, range_censor = formatters::with_label(range_censor, "Range (censored)"), range_event = formatters::with_label(range_event, "Range (event)"), range = formatters::with_label(range, "Range"), - median_ci_1_line = formatters::with_label(c(unname(srv_tab["median"]),unname(srv_tab[paste0(srv_fit$conf.int, c("LCL", "UCL"))])), - paste0("Median ",f_conf_level(conf_level))), + median_ci_1_line = formatters::with_label( + c(unname(srv_tab["median"]), unname(srv_tab[paste0(srv_fit$conf.int, c("LCL", "UCL"))])), + paste0("Median ", f_conf_level(conf_level)) + ), quantiles_ci_1 = formatters::with_label( unname(srv_qt_ci[[1]]), paste0(quantiles[1] * 100, "%-ile with ", f_conf_level(conf_level)) ), quantiles_ci_2 = formatters::with_label( unname(srv_qt_ci[[2]]), paste0(quantiles[2] * 100, "%-ile with ", f_conf_level(conf_level)) ) - ) } @@ -142,13 +145,17 @@ a_surv_time <- function(df, rng_censor_upr <- x_stats[["range_censor"]][2] # Use method-specific defaults - fmts <- c(median_ci = "(xx.x, xx.x)", quantiles = "xx.x, xx.x", range = "xx.x to xx.x", - median_ci_1_line = "xx.x (xx.x - xx.x)", - quantiles_ci_1 = "xx.x (xx.x - xx.x)", quantiles_ci_2 = "xx.x (xx.x - xx.x)") - lbls <- c(median_ci = "95% CI", range = "Range", range_censor = "Range (censored)", range_event = "Range (event)", - median_ci_1_line = "Median 95% CI", - quantiles_ci_1 = "25%-ile with 95% CI", - quantiles_ci_2 = "75%-ile with 95% CI") + fmts <- c( + median_ci = "(xx.x, xx.x)", quantiles = "xx.x, xx.x", range = "xx.x to xx.x", + median_ci_1_line = "xx.x (xx.x - xx.x)", + quantiles_ci_1 = "xx.x (xx.x - xx.x)", quantiles_ci_2 = "xx.x (xx.x - xx.x)" + ) + lbls <- c( + median_ci = "95% CI", range = "Range", range_censor = "Range (censored)", range_event = "Range (event)", + median_ci_1_line = "Median 95% CI", + quantiles_ci_1 = "25%-ile with 95% CI", + quantiles_ci_2 = "75%-ile with 95% CI" + ) lbls_custom <- .labels .formats <- c(.formats, fmts[setdiff(names(fmts), names(.formats))]) .labels <- c(.labels, lbls[setdiff(names(lbls), names(lbls_custom))]) @@ -235,7 +242,7 @@ surv_time <- function(lyt, var_labels = var_labels, show_labels = show_labels, table_names = table_names, - #na_str = na_str, + # na_str = na_str, nested = nested, extra_args = extra_args ) diff --git a/R/utils_default_stats_formats_labels.R b/R/utils_default_stats_formats_labels.R index f3ff415111..14a5f7aacd 100644 --- a/R/utils_default_stats_formats_labels.R +++ b/R/utils_default_stats_formats_labels.R @@ -345,16 +345,16 @@ labels_use_control <- function(labels_default, control, labels_custom = NULL) { ) } if ("quantiles" %in% names(control) && "quantiles_ci_1" %in% names(labels_default) && - !"quantiles_ci_1" %in% names(labels_custom)) { # nolint + !"quantiles_ci_1" %in% names(labels_custom)) { # nolint labels_default["quantiles_ci_1"] <- gsub( - "[0-9]+%-ile", paste0(control[["quantiles"]][1] * 100,"%-ile",""), + "[0-9]+%-ile", paste0(control[["quantiles"]][1] * 100, "%-ile", ""), labels_default["quantiles_ci_1"] ) } if ("quantiles" %in% names(control) && "quantiles_ci_2" %in% names(labels_default) && - !"quantiles_ci_2" %in% names(labels_custom)) { # nolint + !"quantiles_ci_2" %in% names(labels_custom)) { # nolint labels_default["quantiles_ci_2"] <- gsub( - "[0-9]+%-ile", paste0(control[["quantiles"]][2] * 100,"%-ile",""), + "[0-9]+%-ile", paste0(control[["quantiles"]][2] * 100, "%-ile", ""), labels_default["quantiles_ci_2"] ) }