From 07e3da613f8a8c5fe6f93623d1ab089ce78d683a Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 5 Sep 2024 21:25:28 -0400 Subject: [PATCH 1/5] Finalize <=0.9.4 argument deprecations --- NEWS.md | 5 +++ R/argument_convention.R | 4 --- R/g_forest.R | 50 +---------------------------- R/g_lineplot.R | 14 +------- R/h_km.R | 9 ------ R/h_response_biomarkers_subgroups.R | 16 --------- R/h_response_subgroups.R | 9 ------ R/h_survival_biomarkers_subgroups.R | 9 ------ R/h_survival_duration_subgroups.R | 9 ------ R/response_biomarkers_subgroups.R | 9 ------ R/response_subgroups.R | 9 ------ R/survival_biomarkers_subgroups.R | 9 ------ R/survival_coxph_pairwise.R | 7 ---- R/survival_duration_subgroups.R | 9 ------ man/argument_convention.Rd | 5 --- man/control_lineplot_vars.Rd | 4 +-- man/g_forest.Rd | 20 +----------- man/survival_coxph_pairwise.Rd | 4 --- 18 files changed, 9 insertions(+), 192 deletions(-) diff --git a/NEWS.md b/NEWS.md index 11daaa6079..72e02e0520 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,6 +20,11 @@ ### 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 following arguments: + - `width_row_names`, `width_forest`, `gp`, `draw`, and `newpage` from `g_forest` + - `strata` and `cohort_id` from `g_lineplot` + - `strat` from `s_coxph_pairwise` + - the `strat` element of the `variables` argument to `h_tbl_coxph_pairwise`, `h_rsp_to_logistic_variables`, `h_odds_ratio_subgroups_df`, `h_coxreg_mult_cont_df`, `h_coxph_subgroups_df`, and the `extract_*` functions. # 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..f82ea41c17 100644 --- a/R/g_forest.R +++ b/R/g_forest.R @@ -24,11 +24,9 @@ #' @param xlim (`numeric(2)`)\cr limits for x axis. #' @param logx (`flag`)\cr show the x-values on logarithm scale. #' @param x_at (`numeric`)\cr x-tick locations, if `NULL`, `x_at` is set to `vline` and both `xlim` values. -#' @param width_row_names `r lifecycle::badge("deprecated")` Please use the `lbl_col_padding` argument instead. #' @param width_columns (`numeric`)\cr a vector of column widths. Each element's position in #' `colwidths` corresponds to the column of `tbl` in the same position. If `NULL`, column widths are calculated #' according to maximum number of characters per column. -#' @param width_forest `r lifecycle::badge("deprecated")` Please use the `rel_width_forest` argument instead. #' @param rel_width_forest (`proportion`)\cr proportion of total width to allocate to the forest plot. Relative #' width of table is then `1 - rel_width_forest`. If `as_list = TRUE`, this parameter is ignored. #' @param font_size (`numeric(1)`)\cr font size. @@ -41,12 +39,6 @@ #' @param as_list (`flag`)\cr whether the two `ggplot` objects should be returned as a list. If `TRUE`, a named list #' with two elements, `table` and `plot`, will be returned. If `FALSE` (default) the table and forest plot are #' printed side-by-side via [cowplot::plot_grid()]. -#' @param gp `r lifecycle::badge("deprecated")` `g_forest` is now generated as a `ggplot` object. This argument -#' is no longer used. -#' @param draw `r lifecycle::badge("deprecated")` `g_forest` is now generated as a `ggplot` object. This argument -#' is no longer used. -#' @param newpage `r lifecycle::badge("deprecated")` `g_forest` is now generated as a `ggplot` object. This argument -#' is no longer used. #' #' @return `ggplot` forest plot and table. #' @@ -166,54 +158,14 @@ g_forest <- function(tbl, xlim = c(0.1, 10), logx = TRUE, x_at = c(0.1, 1, 10), - width_row_names = lifecycle::deprecated(), width_columns = NULL, - width_forest = lifecycle::deprecated(), lbl_col_padding = 0, rel_width_forest = 0.25, font_size = 12, col_symbol_size = attr(tbl, "col_symbol_size"), col = getOption("ggplot2.discrete.colour")[1], ggtheme = NULL, - as_list = FALSE, - gp = lifecycle::deprecated(), - draw = lifecycle::deprecated(), - newpage = lifecycle::deprecated()) { - # 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)", - 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)", - 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)", - details = paste( - "`g_forest` is now generated as a `ggplot` object.", - "Additional display settings should be supplied via the `ggtheme` parameter." - ) - ) - } - if (lifecycle::is_present(draw)) { - lifecycle::deprecate_warn( - "0.9.3", "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)", - details = "`g_forest` now generates `ggplot` objects. This parameter has no effect." - ) - } - + as_list = FALSE) { checkmate::assert_class(tbl, "VTableTree") checkmate::assert_number(col_x, lower = 0, upper = ncol(tbl), null.ok = TRUE) checkmate::assert_number(col_ci, lower = 0, upper = ncol(tbl), null.ok = TRUE) diff --git a/R/g_lineplot.R b/R/g_lineplot.R index a234e835b3..72d86cc2bd 100644 --- a/R/g_lineplot.R +++ b/R/g_lineplot.R @@ -568,19 +568,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..9ca63ee2fb 100644 --- a/R/h_km.R +++ b/R/h_km.R @@ -185,15 +185,6 @@ h_tbl_coxph_pairwise <- function(df, ref_group_coxph = NULL, control_coxph_pw = control_coxph(), annot_coxph_ref_lbls = FALSE) { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - assert_df_with_variables(df, variables) checkmate::assert_choice(ref_group_coxph, levels(df[[variables$arm]]), null.ok = TRUE) checkmate::assert_flag(annot_coxph_ref_lbls) diff --git a/R/h_response_biomarkers_subgroups.R b/R/h_response_biomarkers_subgroups.R index 43088f2200..1ddcef70e5 100644 --- a/R/h_response_biomarkers_subgroups.R +++ b/R/h_response_biomarkers_subgroups.R @@ -46,14 +46,6 @@ NULL #' #' @export 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } checkmate::assert_list(variables) checkmate::assert_string(variables$rsp) checkmate::assert_string(biomarker) @@ -103,14 +95,6 @@ h_rsp_to_logistic_variables <- function(variables, biomarker) { h_logistic_mult_cont_df <- function(variables, data, control = control_logistic()) { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } assert_df_with_variables(data, variables) checkmate::assert_character(variables$biomarkers, min.len = 1, any.missing = FALSE) diff --git a/R/h_response_subgroups.R b/R/h_response_subgroups.R index 173ef292c0..b6aa376cfa 100644 --- a/R/h_response_subgroups.R +++ b/R/h_response_subgroups.R @@ -325,15 +325,6 @@ h_odds_ratio_subgroups_df <- function(variables, conf_level = 0.95, method = NULL, label_all = "All Patients") { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - checkmate::assert_character(variables$rsp) checkmate::assert_character(variables$arm) checkmate::assert_character(variables$subgroups, null.ok = TRUE) diff --git a/R/h_survival_biomarkers_subgroups.R b/R/h_survival_biomarkers_subgroups.R index 9f9de3f34d..6d89b3fb1b 100644 --- a/R/h_survival_biomarkers_subgroups.R +++ b/R/h_survival_biomarkers_subgroups.R @@ -107,15 +107,6 @@ h_surv_to_coxreg_variables <- function(variables, biomarker) { h_coxreg_mult_cont_df <- function(variables, data, control = control_coxreg()) { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - assert_df_with_variables(data, variables) checkmate::assert_list(control, names = "named") checkmate::assert_character(variables$biomarkers, min.len = 1, any.missing = FALSE) diff --git a/R/h_survival_duration_subgroups.R b/R/h_survival_duration_subgroups.R index 69ac0c62f0..8cd9819d5d 100644 --- a/R/h_survival_duration_subgroups.R +++ b/R/h_survival_duration_subgroups.R @@ -332,15 +332,6 @@ h_coxph_subgroups_df <- function(variables, groups_lists = list(), control = control_coxph(), label_all = "All Patients") { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - checkmate::assert_character(variables$tte) checkmate::assert_character(variables$is_event) checkmate::assert_character(variables$arm) diff --git a/R/response_biomarkers_subgroups.R b/R/response_biomarkers_subgroups.R index 360432998b..e09790ee93 100644 --- a/R/response_biomarkers_subgroups.R +++ b/R/response_biomarkers_subgroups.R @@ -192,15 +192,6 @@ extract_rsp_biomarkers <- function(variables, groups_lists = list(), control = control_logistic(), label_all = "All Patients") { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - assert_list_of_variables(variables) checkmate::assert_string(variables$rsp) checkmate::assert_character(variables$subgroups, null.ok = TRUE) diff --git a/R/response_subgroups.R b/R/response_subgroups.R index c7c61d4b94..aee7b21d40 100644 --- a/R/response_subgroups.R +++ b/R/response_subgroups.R @@ -96,15 +96,6 @@ extract_rsp_subgroups <- function(variables, conf_level = 0.95, method = NULL, label_all = "All Patients") { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - df_prop <- h_proportion_subgroups_df( variables, data, diff --git a/R/survival_biomarkers_subgroups.R b/R/survival_biomarkers_subgroups.R index c527f0209e..12ac6facc0 100644 --- a/R/survival_biomarkers_subgroups.R +++ b/R/survival_biomarkers_subgroups.R @@ -113,15 +113,6 @@ extract_survival_biomarkers <- function(variables, groups_lists = list(), control = control_coxreg(), label_all = "All Patients") { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - checkmate::assert_list(variables) checkmate::assert_character(variables$subgroups, null.ok = TRUE) checkmate::assert_string(label_all) diff --git a/R/survival_coxph_pairwise.R b/R/survival_coxph_pairwise.R index 4495962290..9025926dd8 100644 --- a/R/survival_coxph_pairwise.R +++ b/R/survival_coxph_pairwise.R @@ -11,7 +11,6 @@ #' @inheritParams argument_convention #' @inheritParams s_surv_time #' @param strata (`character` or `NULL`)\cr variable names indicating stratification factors. -#' @param strat `r lifecycle::badge("deprecated")` Please use the `strata` argument instead. #' @param control (`list`)\cr parameters for comparison details, specified by using the helper function #' [control_coxph()]. Some possible parameter options are: #' * `pval_method` (`string`)\cr p-value method for testing the null hypothesis that hazard ratio = 1. Default @@ -44,13 +43,7 @@ s_coxph_pairwise <- function(df, .var, is_event, strata = NULL, - 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)") - strata <- strat - } - checkmate::assert_string(.var) checkmate::assert_numeric(df[[.var]]) checkmate::assert_logical(df[[is_event]]) diff --git a/R/survival_duration_subgroups.R b/R/survival_duration_subgroups.R index 90fc9b2376..4a86edc2c6 100644 --- a/R/survival_duration_subgroups.R +++ b/R/survival_duration_subgroups.R @@ -120,15 +120,6 @@ extract_survival_subgroups <- function(variables, groups_lists = list(), control = control_coxph(), label_all = "All Patients") { - 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 ", - "Please use the name `strata` instead of `strat` in the `variables` argument." - ) - variables[["strata"]] <- variables[["strat"]] - } - df_survtime <- h_survtime_subgroups_df( variables, data, 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..cf7b664404 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{ diff --git a/man/g_forest.Rd b/man/g_forest.Rd index 7144dd2ba7..87798d708f 100644 --- a/man/g_forest.Rd +++ b/man/g_forest.Rd @@ -13,19 +13,14 @@ g_forest( xlim = c(0.1, 10), logx = TRUE, x_at = c(0.1, 1, 10), - width_row_names = lifecycle::deprecated(), width_columns = NULL, - width_forest = lifecycle::deprecated(), lbl_col_padding = 0, rel_width_forest = 0.25, font_size = 12, col_symbol_size = attr(tbl, "col_symbol_size"), col = getOption("ggplot2.discrete.colour")[1], ggtheme = NULL, - as_list = FALSE, - gp = lifecycle::deprecated(), - draw = lifecycle::deprecated(), - newpage = lifecycle::deprecated() + as_list = FALSE ) } \arguments{ @@ -53,14 +48,10 @@ If \code{vline = NULL} then \code{forest_header} is not printed. By default trie \item{x_at}{(\code{numeric})\cr x-tick locations, if \code{NULL}, \code{x_at} is set to \code{vline} and both \code{xlim} values.} -\item{width_row_names}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{lbl_col_padding} argument instead.} - \item{width_columns}{(\code{numeric})\cr a vector of column widths. Each element's position in \code{colwidths} corresponds to the column of \code{tbl} in the same position. If \code{NULL}, column widths are calculated according to maximum number of characters per column.} -\item{width_forest}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{rel_width_forest} argument instead.} - \item{lbl_col_padding}{(\code{numeric})\cr additional padding to use when calculating spacing between the first (label) column and the second column of \code{tbl}. If \code{colwidths} is specified, the width of the first column becomes \code{colwidths[1] + lbl_col_padding}. Defaults to 0.} @@ -82,15 +73,6 @@ By default tries to get this from \code{tbl} attribute \code{col_symbol_size}, o \item{as_list}{(\code{flag})\cr whether the two \code{ggplot} objects should be returned as a list. If \code{TRUE}, a named list with two elements, \code{table} and \code{plot}, will be returned. If \code{FALSE} (default) the table and forest plot are printed side-by-side via \code{\link[cowplot:plot_grid]{cowplot::plot_grid()}}.} - -\item{gp}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} \code{g_forest} is now generated as a \code{ggplot} object. This argument -is no longer used.} - -\item{draw}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} \code{g_forest} is now generated as a \code{ggplot} object. This argument -is no longer used.} - -\item{newpage}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} \code{g_forest} is now generated as a \code{ggplot} object. This argument -is no longer used.} } \value{ \code{ggplot} forest plot and table. diff --git a/man/survival_coxph_pairwise.Rd b/man/survival_coxph_pairwise.Rd index 56231f2082..1341ba7415 100644 --- a/man/survival_coxph_pairwise.Rd +++ b/man/survival_coxph_pairwise.Rd @@ -31,7 +31,6 @@ s_coxph_pairwise( .var, is_event, strata = NULL, - strat = lifecycle::deprecated(), control = control_coxph() ) @@ -42,7 +41,6 @@ a_coxph_pairwise( .var, is_event, strata = NULL, - strat = lifecycle::deprecated(), control = control_coxph() ) } @@ -100,8 +98,6 @@ unmodified default behavior. Can be negative.} by a statistics function.} \item{is_event}{(\code{flag})\cr \code{TRUE} if event, \code{FALSE} if time to event is censored.} - -\item{strat}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{strata} argument instead.} } \value{ \itemize{ From 344a21c16e988255ecd0ba54541bc11ce1f840b5 Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 5 Sep 2024 21:48:53 -0400 Subject: [PATCH 2/5] Change to correct deprec versions --- NEWS.md | 5 --- R/g_forest.R | 50 +++++++++++++++++++++++++- R/h_km.R | 9 +++++ R/h_response_biomarkers_subgroups.R | 16 +++++++++ R/h_response_subgroups.R | 9 +++++ R/h_survival_biomarkers_subgroups.R | 9 +++++ R/h_survival_duration_subgroups.R | 9 +++++ R/response_biomarkers_subgroups.R | 9 +++++ R/response_subgroups.R | 9 +++++ R/survival_biomarkers_subgroups.R | 9 +++++ R/survival_coxph_pairwise.R | 7 ++++ R/survival_duration_subgroups.R | 9 +++++ R/utils_default_stats_formats_labels.R | 4 +-- man/g_forest.Rd | 20 ++++++++++- man/survival_coxph_pairwise.Rd | 4 +++ 15 files changed, 169 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index 72e02e0520..11daaa6079 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,11 +20,6 @@ ### 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 following arguments: - - `width_row_names`, `width_forest`, `gp`, `draw`, and `newpage` from `g_forest` - - `strata` and `cohort_id` from `g_lineplot` - - `strat` from `s_coxph_pairwise` - - the `strat` element of the `variables` argument to `h_tbl_coxph_pairwise`, `h_rsp_to_logistic_variables`, `h_odds_ratio_subgroups_df`, `h_coxreg_mult_cont_df`, `h_coxph_subgroups_df`, and the `extract_*` functions. # tern 0.9.5 diff --git a/R/g_forest.R b/R/g_forest.R index f82ea41c17..b1709ea88e 100644 --- a/R/g_forest.R +++ b/R/g_forest.R @@ -24,9 +24,11 @@ #' @param xlim (`numeric(2)`)\cr limits for x axis. #' @param logx (`flag`)\cr show the x-values on logarithm scale. #' @param x_at (`numeric`)\cr x-tick locations, if `NULL`, `x_at` is set to `vline` and both `xlim` values. +#' @param width_row_names `r lifecycle::badge("deprecated")` Please use the `lbl_col_padding` argument instead. #' @param width_columns (`numeric`)\cr a vector of column widths. Each element's position in #' `colwidths` corresponds to the column of `tbl` in the same position. If `NULL`, column widths are calculated #' according to maximum number of characters per column. +#' @param width_forest `r lifecycle::badge("deprecated")` Please use the `rel_width_forest` argument instead. #' @param rel_width_forest (`proportion`)\cr proportion of total width to allocate to the forest plot. Relative #' width of table is then `1 - rel_width_forest`. If `as_list = TRUE`, this parameter is ignored. #' @param font_size (`numeric(1)`)\cr font size. @@ -39,6 +41,12 @@ #' @param as_list (`flag`)\cr whether the two `ggplot` objects should be returned as a list. If `TRUE`, a named list #' with two elements, `table` and `plot`, will be returned. If `FALSE` (default) the table and forest plot are #' printed side-by-side via [cowplot::plot_grid()]. +#' @param gp `r lifecycle::badge("deprecated")` `g_forest` is now generated as a `ggplot` object. This argument +#' is no longer used. +#' @param draw `r lifecycle::badge("deprecated")` `g_forest` is now generated as a `ggplot` object. This argument +#' is no longer used. +#' @param newpage `r lifecycle::badge("deprecated")` `g_forest` is now generated as a `ggplot` object. This argument +#' is no longer used. #' #' @return `ggplot` forest plot and table. #' @@ -158,14 +166,54 @@ g_forest <- function(tbl, xlim = c(0.1, 10), logx = TRUE, x_at = c(0.1, 1, 10), + width_row_names = lifecycle::deprecated(), width_columns = NULL, + width_forest = lifecycle::deprecated(), lbl_col_padding = 0, rel_width_forest = 0.25, font_size = 12, col_symbol_size = attr(tbl, "col_symbol_size"), col = getOption("ggplot2.discrete.colour")[1], ggtheme = NULL, - as_list = FALSE) { + as_list = FALSE, + gp = lifecycle::deprecated(), + draw = lifecycle::deprecated(), + newpage = lifecycle::deprecated()) { + # Deprecated argument warnings + if (lifecycle::is_present(width_row_names)) { + lifecycle::deprecate_warn( + "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.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.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." + ) + ) + } + if (lifecycle::is_present(draw)) { + lifecycle::deprecate_warn( + "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.4", "g_forest(newpage)", + details = "`g_forest` now generates `ggplot` objects. This parameter has no effect." + ) + } + checkmate::assert_class(tbl, "VTableTree") checkmate::assert_number(col_x, lower = 0, upper = ncol(tbl), null.ok = TRUE) checkmate::assert_number(col_ci, lower = 0, upper = ncol(tbl), null.ok = TRUE) diff --git a/R/h_km.R b/R/h_km.R index 9ca63ee2fb..bc7dd6b06d 100644 --- a/R/h_km.R +++ b/R/h_km.R @@ -185,6 +185,15 @@ h_tbl_coxph_pairwise <- function(df, ref_group_coxph = NULL, control_coxph_pw = control_coxph(), annot_coxph_ref_lbls = FALSE) { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + assert_df_with_variables(df, variables) checkmate::assert_choice(ref_group_coxph, levels(df[[variables$arm]]), null.ok = TRUE) checkmate::assert_flag(annot_coxph_ref_lbls) diff --git a/R/h_response_biomarkers_subgroups.R b/R/h_response_biomarkers_subgroups.R index 1ddcef70e5..706bf247c0 100644 --- a/R/h_response_biomarkers_subgroups.R +++ b/R/h_response_biomarkers_subgroups.R @@ -46,6 +46,14 @@ NULL #' #' @export 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } checkmate::assert_list(variables) checkmate::assert_string(variables$rsp) checkmate::assert_string(biomarker) @@ -95,6 +103,14 @@ h_rsp_to_logistic_variables <- function(variables, biomarker) { h_logistic_mult_cont_df <- function(variables, data, control = control_logistic()) { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } assert_df_with_variables(data, variables) checkmate::assert_character(variables$biomarkers, min.len = 1, any.missing = FALSE) diff --git a/R/h_response_subgroups.R b/R/h_response_subgroups.R index b6aa376cfa..9d968fdf13 100644 --- a/R/h_response_subgroups.R +++ b/R/h_response_subgroups.R @@ -325,6 +325,15 @@ h_odds_ratio_subgroups_df <- function(variables, conf_level = 0.95, method = NULL, label_all = "All Patients") { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + checkmate::assert_character(variables$rsp) checkmate::assert_character(variables$arm) checkmate::assert_character(variables$subgroups, null.ok = TRUE) diff --git a/R/h_survival_biomarkers_subgroups.R b/R/h_survival_biomarkers_subgroups.R index 6d89b3fb1b..cb5519b0c9 100644 --- a/R/h_survival_biomarkers_subgroups.R +++ b/R/h_survival_biomarkers_subgroups.R @@ -107,6 +107,15 @@ h_surv_to_coxreg_variables <- function(variables, biomarker) { h_coxreg_mult_cont_df <- function(variables, data, control = control_coxreg()) { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + assert_df_with_variables(data, variables) checkmate::assert_list(control, names = "named") checkmate::assert_character(variables$biomarkers, min.len = 1, any.missing = FALSE) diff --git a/R/h_survival_duration_subgroups.R b/R/h_survival_duration_subgroups.R index 8cd9819d5d..fcc6680e9a 100644 --- a/R/h_survival_duration_subgroups.R +++ b/R/h_survival_duration_subgroups.R @@ -332,6 +332,15 @@ h_coxph_subgroups_df <- function(variables, groups_lists = list(), control = control_coxph(), label_all = "All Patients") { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + checkmate::assert_character(variables$tte) checkmate::assert_character(variables$is_event) checkmate::assert_character(variables$arm) diff --git a/R/response_biomarkers_subgroups.R b/R/response_biomarkers_subgroups.R index e09790ee93..b18ad598ae 100644 --- a/R/response_biomarkers_subgroups.R +++ b/R/response_biomarkers_subgroups.R @@ -192,6 +192,15 @@ extract_rsp_biomarkers <- function(variables, groups_lists = list(), control = control_logistic(), label_all = "All Patients") { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + assert_list_of_variables(variables) checkmate::assert_string(variables$rsp) checkmate::assert_character(variables$subgroups, null.ok = TRUE) diff --git a/R/response_subgroups.R b/R/response_subgroups.R index aee7b21d40..d80924d4e4 100644 --- a/R/response_subgroups.R +++ b/R/response_subgroups.R @@ -96,6 +96,15 @@ extract_rsp_subgroups <- function(variables, conf_level = 0.95, method = NULL, label_all = "All Patients") { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + df_prop <- h_proportion_subgroups_df( variables, data, diff --git a/R/survival_biomarkers_subgroups.R b/R/survival_biomarkers_subgroups.R index 12ac6facc0..72cffb2334 100644 --- a/R/survival_biomarkers_subgroups.R +++ b/R/survival_biomarkers_subgroups.R @@ -113,6 +113,15 @@ extract_survival_biomarkers <- function(variables, groups_lists = list(), control = control_coxreg(), label_all = "All Patients") { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + checkmate::assert_list(variables) checkmate::assert_character(variables$subgroups, null.ok = TRUE) checkmate::assert_string(label_all) diff --git a/R/survival_coxph_pairwise.R b/R/survival_coxph_pairwise.R index 9025926dd8..88ec24b68e 100644 --- a/R/survival_coxph_pairwise.R +++ b/R/survival_coxph_pairwise.R @@ -11,6 +11,7 @@ #' @inheritParams argument_convention #' @inheritParams s_surv_time #' @param strata (`character` or `NULL`)\cr variable names indicating stratification factors. +#' @param strat `r lifecycle::badge("deprecated")` Please use the `strata` argument instead. #' @param control (`list`)\cr parameters for comparison details, specified by using the helper function #' [control_coxph()]. Some possible parameter options are: #' * `pval_method` (`string`)\cr p-value method for testing the null hypothesis that hazard ratio = 1. Default @@ -43,7 +44,13 @@ s_coxph_pairwise <- function(df, .var, is_event, strata = NULL, + strat = lifecycle::deprecated(), control = control_coxph()) { + if (lifecycle::is_present(strat)) { + lifecycle::deprecate_warn("0.9.4", "s_coxph_pairwise(strat)", "s_coxph_pairwise(strata)") + strata <- strat + } + checkmate::assert_string(.var) checkmate::assert_numeric(df[[.var]]) checkmate::assert_logical(df[[is_event]]) diff --git a/R/survival_duration_subgroups.R b/R/survival_duration_subgroups.R index 4a86edc2c6..eab7e46b9b 100644 --- a/R/survival_duration_subgroups.R +++ b/R/survival_duration_subgroups.R @@ -120,6 +120,15 @@ extract_survival_subgroups <- function(variables, groups_lists = list(), control = control_coxph(), label_all = "All Patients") { + 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.4.\n ", + "Please use the name `strata` instead of `strat` in the `variables` argument." + ) + variables[["strata"]] <- variables[["strat"]] + } + df_survtime <- h_survtime_subgroups_df( variables, data, 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/g_forest.Rd b/man/g_forest.Rd index 87798d708f..7144dd2ba7 100644 --- a/man/g_forest.Rd +++ b/man/g_forest.Rd @@ -13,14 +13,19 @@ g_forest( xlim = c(0.1, 10), logx = TRUE, x_at = c(0.1, 1, 10), + width_row_names = lifecycle::deprecated(), width_columns = NULL, + width_forest = lifecycle::deprecated(), lbl_col_padding = 0, rel_width_forest = 0.25, font_size = 12, col_symbol_size = attr(tbl, "col_symbol_size"), col = getOption("ggplot2.discrete.colour")[1], ggtheme = NULL, - as_list = FALSE + as_list = FALSE, + gp = lifecycle::deprecated(), + draw = lifecycle::deprecated(), + newpage = lifecycle::deprecated() ) } \arguments{ @@ -48,10 +53,14 @@ If \code{vline = NULL} then \code{forest_header} is not printed. By default trie \item{x_at}{(\code{numeric})\cr x-tick locations, if \code{NULL}, \code{x_at} is set to \code{vline} and both \code{xlim} values.} +\item{width_row_names}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{lbl_col_padding} argument instead.} + \item{width_columns}{(\code{numeric})\cr a vector of column widths. Each element's position in \code{colwidths} corresponds to the column of \code{tbl} in the same position. If \code{NULL}, column widths are calculated according to maximum number of characters per column.} +\item{width_forest}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{rel_width_forest} argument instead.} + \item{lbl_col_padding}{(\code{numeric})\cr additional padding to use when calculating spacing between the first (label) column and the second column of \code{tbl}. If \code{colwidths} is specified, the width of the first column becomes \code{colwidths[1] + lbl_col_padding}. Defaults to 0.} @@ -73,6 +82,15 @@ By default tries to get this from \code{tbl} attribute \code{col_symbol_size}, o \item{as_list}{(\code{flag})\cr whether the two \code{ggplot} objects should be returned as a list. If \code{TRUE}, a named list with two elements, \code{table} and \code{plot}, will be returned. If \code{FALSE} (default) the table and forest plot are printed side-by-side via \code{\link[cowplot:plot_grid]{cowplot::plot_grid()}}.} + +\item{gp}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} \code{g_forest} is now generated as a \code{ggplot} object. This argument +is no longer used.} + +\item{draw}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} \code{g_forest} is now generated as a \code{ggplot} object. This argument +is no longer used.} + +\item{newpage}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} \code{g_forest} is now generated as a \code{ggplot} object. This argument +is no longer used.} } \value{ \code{ggplot} forest plot and table. diff --git a/man/survival_coxph_pairwise.Rd b/man/survival_coxph_pairwise.Rd index 1341ba7415..56231f2082 100644 --- a/man/survival_coxph_pairwise.Rd +++ b/man/survival_coxph_pairwise.Rd @@ -31,6 +31,7 @@ s_coxph_pairwise( .var, is_event, strata = NULL, + strat = lifecycle::deprecated(), control = control_coxph() ) @@ -41,6 +42,7 @@ a_coxph_pairwise( .var, is_event, strata = NULL, + strat = lifecycle::deprecated(), control = control_coxph() ) } @@ -98,6 +100,8 @@ unmodified default behavior. Can be negative.} by a statistics function.} \item{is_event}{(\code{flag})\cr \code{TRUE} if event, \code{FALSE} if time to event is censored.} + +\item{strat}{\ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#deprecated}{\figure{lifecycle-deprecated.svg}{options: alt='[Deprecated]'}}}{\strong{[Deprecated]}} Please use the \code{strata} argument instead.} } \value{ \itemize{ From dc5a5c478cc1b81b450a8a3cdff4306571ed3291 Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 5 Sep 2024 21:50:59 -0400 Subject: [PATCH 3/5] Update NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) 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 From 895b3eb9b3f413101c7b99c2f473d2470106928d Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 5 Sep 2024 21:56:03 -0400 Subject: [PATCH 4/5] Update docs --- R/g_lineplot.R | 2 -- man/control_lineplot_vars.Rd | 4 ---- 2 files changed, 6 deletions(-) diff --git a/R/g_lineplot.R b/R/g_lineplot.R index 72d86cc2bd..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. diff --git a/man/control_lineplot_vars.Rd b/man/control_lineplot_vars.Rd index cf7b664404..33dd7b3838 100644 --- a/man/control_lineplot_vars.Rd +++ b/man/control_lineplot_vars.Rd @@ -28,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. From 10fb5a132790201b22303edf29541c3f412a626a Mon Sep 17 00:00:00 2001 From: Emily de la Rua Date: Thu, 5 Sep 2024 21:57:52 -0400 Subject: [PATCH 5/5] Remove test --- tests/testthat/test-g_lineplot.R | 3 --- 1 file changed, 3 deletions(-) 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", {