Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #2521 remove lifecycle deprecation code for get summary records #2568

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
730c3c1
#2521 Do I understand correctly?
jimrothstein Nov 17, 2024
686ae27
# 2521 remove lifecycle deprecation code for get_summary_records()
jimrothstein Nov 17, 2024
98d393e
Merge branch 'main' into 2521_remove_lifecycle_deprecation_code_for_g…
jimrothstein Nov 18, 2024
ca966b9
2521 - `analysis_var`, `summary_fun` removed from code, documentation.
jimrothstein Nov 18, 2024
78e4a50
2521 - testthat/test-get_summary_records.R updated to FAIL if user a…
jimrothstein Nov 18, 2024
07facf9
2521 - Ran styler, lint, spelling.
jimrothstein Nov 18, 2024
8251cd3
2521 Why is lint complaining?
jimrothstein Nov 18, 2024
e3ff973
fix styler error
jimrothstein Nov 18, 2024
6ffdbc9
Merge branch 'main' into 2521_remove_lifecycle_deprecation_code_for_g…
jimrothstein Nov 20, 2024
553b64d
2521 - Unnecessary test removed. NOTE:
jimrothstein Nov 20, 2024
190096a
2521 - ran styler & lint
jimrothstein Nov 20, 2024
743d02b
#2521 NEWS.md updated
jimrothstein Nov 21, 2024
5f95fe8
2521 - update documentation for `derive_param_exposure` (had used de…
jimrothstein Nov 22, 2024
a0a9e63
2521 - correction
jimrothstein Nov 22, 2024
f57d296
2521 - forgot document()
jimrothstein Nov 22, 2024
010c9bd
Merge branch 'main' into 2521_remove_lifecycle_deprecation_code_for_g…
jimrothstein Nov 22, 2024
73d2fcd
Merge branch 'main' into 2521_remove_lifecycle_deprecation_code_for_g…
bms63 Dec 1, 2024
326d7f0
2521 - adjust documentation `derive_param_exposure()`
jimrothstein Dec 2, 2024
4767581
Merge branch '2521_remove_lifecycle_deprecation_code_for_get_summary_…
jimrothstein Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ or that the queries dataset contains duplicates. (#2543)

- test scripts, R, and markdown files for `create_single_dose_dataset` and `occds.Rmd` updated to include a `STUDYID` column because of `get_admiral_option("subject_keys")` update above. (#2501)

- In `get_summary_records()`, previously deprecated formal arguments `analysis_var` and `summary_fun` now removed from function, documentation, tests etc. (#2521)

## Breaking Changes

- The following function arguments are entering the next phase of the deprecation process: (#2487)
Expand Down
6 changes: 3 additions & 3 deletions R/derive_param_exposure.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
#' an observation is added to the output dataset and the defined values are set to the defined
#' variables
#'
#' @return The input dataset with a new record added for each group (with respect to the variables
#' specified for the `by_vars` parameter). That is, a variable will only
#' @return The input dataset with a new record added for each group (as defined
#' by `by_vars` parameter). That is, a variable will only
#' be populated in this new record if it is specified in `by_vars`.
#' For each new record,
#' + the variable specified `analysis_var` is computed as defined by `summary_fun`,
#' + `set_values_to` lists each specified variable and computes its value,
#' + the variable(s) specified on the LHS of `set_values_to` are set to their paired value (RHS).
#' In addition, the start and end date are computed as the minimum/maximum dates by `by_vars`.
#'
Expand Down
26 changes: 1 addition & 25 deletions R/get_summary_records.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' see the `derive_summary_records()` function.
#'
#' @param dataset
#' `r roxygen_param_dataset(expected_vars = c("by_vars", "analysis_var"))`
#' `r roxygen_param_dataset(expected_vars = c("by_vars"))`
#'
#' @param by_vars Grouping variables
#'
Expand All @@ -38,18 +38,6 @@
#' + `filter_rows = (dplyr::n() > 2)` will filter n count of `by_vars` greater
#' than 2.
#'
#' @param analysis_var Analysis variable.
#'
#' `r lifecycle::badge("deprecated")` Please use `set_values_to` instead.
#'
#' @param summary_fun Function that takes as an input the `analysis_var` and
#' performs the calculation.
#'
#' `r lifecycle::badge("deprecated")` Please use `set_values_to` instead.
#'
#' This can include built-in functions as well as user defined functions,
#' for example `mean` or `function(x) mean(x, na.rm = TRUE)`.
#'
#' @param set_values_to Variables to be set
#'
#' The specified variables are set to the specified values for the new
Expand Down Expand Up @@ -160,8 +148,6 @@
get_summary_records <- function(dataset,
by_vars,
filter = NULL,
analysis_var,
summary_fun,
set_values_to = NULL) {
assert_vars(by_vars)
filter <- assert_filter_cond(enexpr(filter), optional = TRUE)
Expand All @@ -171,16 +157,6 @@ get_summary_records <- function(dataset,
check_is_grouped = FALSE
)
assert_varval_list(set_values_to)
if (!missing(analysis_var) || !missing(summary_fun)) {
deprecate_stop(
"1.1.0",
I("get_summary_records(anaylsis_var = , summary_fun = )"),
"get_summary_records(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)
}

# Summarise the analysis value
dataset %>%
Expand Down
6 changes: 3 additions & 3 deletions man/derive_param_exposure.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 2 additions & 21 deletions man/get_summary_records.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading