diff --git a/R/derive_var_extreme_date.R b/R/derive_var_extreme_date.R index 82c4d6afbe..28a348a495 100644 --- a/R/derive_var_extreme_date.R +++ b/R/derive_var_extreme_date.R @@ -649,6 +649,17 @@ date_source <- function(dataset_name, filter = NULL, date, set_values_to = NULL) { + + deprecate_inform( + when = "1.2.0", + what = "date_source()", + with = "derive_vars_extreme_event()", + details = c( + x = "This message will turn into a warning with release of 1.3.0", + i = "https://pharmaverse.github.io/admiral/reference/derive_vars_extreme_event.html" + ) + ) + out <- list( dataset_name = assert_character_scalar(dataset_name), filter = assert_filter_cond(enexpr(filter), optional = TRUE), diff --git a/tests/testthat/_snaps/derive_var_extreme_date.md b/tests/testthat/_snaps/derive_var_extreme_date.md index 8b84862f9a..a8f6c95aed 100644 --- a/tests/testthat/_snaps/derive_var_extreme_date.md +++ b/tests/testthat/_snaps/derive_var_extreme_date.md @@ -8,6 +8,10 @@ i Please use `derive_vars_extreme_event()` instead. x This message will turn into a warning with release of 1.3.0 i https://pharmaverse.github.io/admiral/reference/derive_vars_extreme_event.html + `derive_var_extreme_dtm()` was deprecated in admiral 1.2.0. + i Please use `derive_vars_extreme_event()` instead. + x This message will turn into a warning with release of 1.3.0 + i https://pharmaverse.github.io/admiral/reference/derive_vars_extreme_event.html Output # A tibble: 3 x 6 STUDYID USUBJID TRTEDTM DTHDTC DTHDT LSTALVDT @@ -16,7 +20,7 @@ 2 STUDY01 2 NA 2020-06 2020-06-01 NA 3 STUDY01 3 2020-04-12 13:15:00 NA 2020-04-12 -# derive_var_extreme_dtm Test 4: Message sent to users +# derive_var_extreme_dtm Test 5: Message sent to users Code derive_var_extreme_dtm(adsl, new_var = LSTALVDTM, source_datasets = list(ae = ae, @@ -35,7 +39,7 @@ 3 STUDY01 3 2020-04-12 13:15:00 NA ADSL NA TRTEDTM # i 1 more variable: LSTALVDTM -# derive_var_extreme_dtm Test 6: error if source dataset is not available +# derive_var_extreme_dtm Test 8: error if source dataset is not available Code derive_var_extreme_dtm(adsl, new_var = LSTALVDTM, source_datasets = list(ea = ae),