Skip to content

Commit

Permalink
deprecate_warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Melkiades committed Aug 17, 2023
1 parent 03a2403 commit 39fad68
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
18 changes: 16 additions & 2 deletions R/analyze_variables.R
Original file line number Diff line number Diff line change
Expand Up @@ -612,11 +612,25 @@ a_summary.numeric <- function(x,
#'
#' @export
create_afun_summary <- function(.stats, .formats, .labels, .indent_mods) {
lifecycle::deprecate_stop(
"0.8.3",
lifecycle::deprecate_warn(
"0.8.5.9010",
"create_afun_summary()",
details = "Please use a_summary() directly instead."
)
function(x,
.ref_group,
.in_ref_col,
...,
.var) {
a_summary(x,
.stats = .stats,
.formats = .formats,
.labels = .labels,
.indent_mods = .indent_mods,
.ref_group = .ref_group,
.in_ref_col = .in_ref_col,
.var = .var, ...)
}
}

#' @describeIn analyze_variables Layout-creating function which can take statistics function arguments
Expand Down
18 changes: 16 additions & 2 deletions R/compare_variables.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,25 @@ create_afun_compare <- function(.stats = NULL,
.formats = NULL,
.labels = NULL,
.indent_mods = NULL) {
lifecycle::deprecate_stop(
"0.8.3",
lifecycle::deprecate_warn(
"0.8.5.9010",
"create_afun_compare()",
details = "Please use a_summary(compare = TRUE) directly instead."
)
function(x,
.ref_group,
.in_ref_col,
...,
.var) {
a_summary(x, compare = TRUE,
.stats = .stats,
.formats = .formats,
.labels = .labels,
.indent_mods = .indent_mods,
.ref_group = .ref_group,
.in_ref_col = .in_ref_col,
.var = .var, ...)
}
}

#' @describeIn compare_variables Layout-creating function which can take statistics function arguments
Expand Down

0 comments on commit 39fad68

Please sign in to comment.