diff --git a/R/derive_summary_records.R b/R/derive_summary_records.R index c678b93d14..e359768872 100644 --- a/R/derive_summary_records.R +++ b/R/derive_summary_records.R @@ -157,14 +157,6 @@ derive_summary_records <- function(dataset, ) assert_varval_list(set_values_to, optional = TRUE) assert_expr_list(missing_values, named = TRUE, optional = TRUE) - - if (!missing(analysis_var) || !missing(summary_fun)) { - deprecate_warn( - "1.0.0", - I("derive_summary_records(anaylsis_var = , summary_fun = )"), - "derive_summary_records(set_values_to = )" - required_vars = by_vars - ) assert_varval_list(set_values_to) if (!missing(analysis_var) || !missing(summary_fun)) { @@ -179,18 +171,18 @@ derive_summary_records <- function(dataset, } # Summarise the analysis value and bind to the original dataset - bind_rows( - dataset, - get_summary_records( - dataset, - by_vars = by_vars, - filter = !!filter, - set_values_to = set_values_to - ) - analysis_var <- assert_symbol(enexpr(analysis_var)) - assert_s3_class(summary_fun, "function") - set_values_to <- exprs(!!analysis_var := {{ summary_fun }}(!!analysis_var), !!!set_values_to) - } + # bind_rows( + # dataset, + # get_summary_records( + # dataset, + # by_vars = by_vars, + # filter = !!filter, + # set_values_to = set_values_to + # ) + # analysis_var <- assert_symbol(enexpr(analysis_var)) + # assert_s3_class(summary_fun, "function") + # set_values_to <- exprs(!!analysis_var := {{ summary_fun }}(!!analysis_var), !!!set_values_to) + # } if (is.null(dataset_add)) { dataset_add <- dataset diff --git a/R/get_summary_records.R b/R/get_summary_records.R index c2dd0a1a9f..eec0b0b634 100644 --- a/R/get_summary_records.R +++ b/R/get_summary_records.R @@ -71,9 +71,9 @@ #' #' @return A data frame of derived records. #' -#' @family der_gen +#' @family superseded #' -#' @keywords der_gen +#' @keywords internal #' #' @seealso [derive_summary_records()], [derive_var_merged_summary()] #' @@ -162,6 +162,7 @@ get_summary_records <- function(dataset, analysis_var, summary_fun, set_values_to = NULL) { + # lifecycle::signal_stage("superseded", "get_summary_records()", "derive_summary_records(dataset_add= )") inform( message = paste0( "`get_summary_records()` has been superseded, ", @@ -169,7 +170,6 @@ get_summary_records <- function(dataset, sep = "" ) ) - set_values_to) { assert_vars(by_vars) filter <- assert_filter_cond(enexpr(filter), optional = TRUE) assert_data_frame(