Skip to content

Commit

Permalink
chasing deprecations (#852)
Browse files Browse the repository at this point in the history
+ changes filer definition in example apps to use `teal_slices`
+ adds namespace prefixes to `get_join_keys` following moving the
function to `teal.data`
+ adds `teal.data` to `Imports`

---------

Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
  • Loading branch information
chlebowa and dependabot-preview[bot] authored Nov 16, 2023
1 parent f858e5d commit 3e00585
Show file tree
Hide file tree
Showing 42 changed files with 72 additions and 84 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Imports:
stats,
styler,
teal.code (>= 0.4.0),
teal.data (>= 0.3.0.9009),
teal.logger (>= 0.1.1),
teal.reporter (>= 0.2.0),
teal.transform (>= 0.4.0),
Expand All @@ -68,7 +69,6 @@ Suggests:
knitr,
lubridate,
nestcolor (>= 0.1.0),
teal.data (>= 0.3.0),
testthat (>= 3.0)
VignetteBuilder:
knitr
Expand Down
4 changes: 2 additions & 2 deletions R/tm_a_gee.R
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,14 @@ srv_gee <- function(id,
datasets = data,
selector_list = selector_list,
merge_function = "dplyr::inner_join",
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = list(arm_var = arm_var),
anl_name = "ANL_ADSL",
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_q <- shiny::reactive({
Expand Down
4 changes: 2 additions & 2 deletions R/tm_a_mmrm.R
Original file line number Diff line number Diff line change
Expand Up @@ -917,14 +917,14 @@ srv_mmrm <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
selector_list = selector_list_without_cov,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_merge_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = list(arm_var = arm_var),
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
anl_name = "ANL_ADSL"
)

Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_barchart_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ srv_g_barchart_simple <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list
)

Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ srv_g_ci <- function(id, # nolint

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list
)

Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_forest_rsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,13 @@ srv_g_forest_rsp <- function(id,
datasets = data,
selector_list = selector_list,
merge_function = "dplyr::inner_join",
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = list(arm_var = arm_var, subgroup_var = subgroup_var, strata_var = strata_var),
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
anl_name = "ANL_ADSL"
)

Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_forest_tte.R
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,14 @@ srv_g_forest_tte <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
data_extract = list(arm_var = arm_var, subgroup_var = subgroup_var, strata_var = strata_var),
anl_name = "ANL_ADSL"
)
Expand Down
4 changes: 2 additions & 2 deletions R/tm_g_ipp.R
Original file line number Diff line number Diff line change
Expand Up @@ -492,12 +492,12 @@ srv_g_ipp <- function(id,
datasets = data,
selector_list = selector_list,
merge_function = "dplyr::inner_join",
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
data_extract = list(arm_var = arm_var, id_var = id_var),
anl_name = "ANL_ADSL"
)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_km.R
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ srv_g_km <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::inner_join"
)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ srv_g_lineplot <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::inner_join"
)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_adverse_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ srv_g_adverse_events <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
selector_list = selector_list,
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_q <- shiny::reactive(
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_patient_timeline.R
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ srv_g_patient_timeline <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list
)

Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_therapy.R
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ srv_g_therapy <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::left_join"
)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_g_pp_vitals.R
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ srv_g_vitals <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::left_join"
)
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_abnormality.R
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,14 @@ srv_t_abnormality <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
data_extract = list(arm_var = arm_var),
anl_name = "ANL_ADSL"
)
Expand Down
12 changes: 5 additions & 7 deletions R/tm_t_abnormality_by_worst_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,9 @@ template_abnormality_by_worst_grade <- function(parentname, # nolint
#' add_total = FALSE
#' )
#' ),
#' filter = (
#' list(
#' ADSL = list(SAFFL = "Y"),
#' ADLB = list(ONTRTFL = "Y")
#' )
#' filter = teal_slices(
#' teal_slice("ADSL", "SAFFL", selected = "Y"),
#' teal_slice("ADLB", "ONTRTFL", selected = "Y")
#' )
#' )
#' if (interactive()) {
Expand Down Expand Up @@ -529,13 +527,13 @@ srv_t_abnormality_by_worst_grade <- function(id, # nolint
anl_inputs <- teal.transform::merge_expression_srv(
selector_list = selector_list,
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
data_extract = list(arm_var = arm_var),
anl_name = "ANL_ADSL"
)
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_ancova.R
Original file line number Diff line number Diff line change
Expand Up @@ -726,15 +726,15 @@ srv_ancova <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
selector_list = selector_list,
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = list(arm_var = arm_var),
anl_name = "ANL_ADSL",
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_q <- shiny::reactive({
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_binary_outcome.R
Original file line number Diff line number Diff line change
Expand Up @@ -783,13 +783,13 @@ srv_t_binary_outcome <- function(id,
datasets = data,
selector_list = selector_list,
merge_function = "dplyr::inner_join",
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = list(arm_var = arm_var, strata_var = strata_var),
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
anl_name = "ANL_ADSL"
)

Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_coxreg.R
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ srv_t_coxreg <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::inner_join"
)
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ srv_t_events_byterm <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::inner_join"
)
Expand All @@ -684,7 +684,7 @@ srv_t_events_byterm <- function(id,
datasets = data,
data_extract = list(arm_var = arm_var),
anl_name = "ANL_ADSL",
join_keys = get_join_keys(data)
join_keys = teal.data::get_join_keys(data)
)

anl_q <- shiny::reactive({
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events_by_grade.R
Original file line number Diff line number Diff line change
Expand Up @@ -1042,14 +1042,14 @@ srv_t_events_by_grade <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
selector_list = selector_list,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = list(arm_var = arm_var),
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
anl_name = "ANL_ADSL"
)

Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events_patyear.R
Original file line number Diff line number Diff line change
Expand Up @@ -436,14 +436,14 @@ srv_events_patyear <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
selector_list = selector_list,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = list(arm_var = arm_var),
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
anl_name = "ANL_ADSL"
)

Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_events_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -820,14 +820,14 @@ srv_t_events_summary <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
selector_list = selector_list,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
data_extract = Filter(Negate(is.null), list(arm_var = arm_var, dthfl_var = dthfl_var, dcsreas_var = dcsreas_var)),
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
anl_name = "ANL_ADSL"
)

Expand Down
8 changes: 3 additions & 5 deletions R/tm_t_exposure.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,7 @@ template_exposure <- function(parentname,
#' add_total = FALSE
#' )
#' ),
#' filter = list(
#' ADSL = list(SAFFL = "Y")
#' )
#' filter = teal_slices(teal_slice("ADSL", "SAFFL", selected = "Y"))
#' )
#' if (interactive()) {
#' shinyApp(app$ui, app$server)
Expand Down Expand Up @@ -524,13 +522,13 @@ srv_t_exposure <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
selector_list = selector_list,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
data_extract = list(col_by_var = col_by_var),
anl_name = "ANL_ADSL"
)
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_logistic.R
Original file line number Diff line number Diff line change
Expand Up @@ -518,13 +518,13 @@ srv_t_logistic <- function(id,
anl_inputs <- teal.transform::merge_expression_srv(
selector_list = selector_list,
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
merge_function = "dplyr::inner_join"
)

adsl_inputs <- teal.transform::merge_expression_module(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
data_extract = list(arm_var = arm_var),
anl_name = "ANL_ADSL"
)
Expand Down
4 changes: 2 additions & 2 deletions R/tm_t_mult_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -479,15 +479,15 @@ srv_t_mult_events_byterm <- function(id,
anl_merge_inputs <- teal.transform::merge_expression_srv(
id = "anl_merge",
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::inner_join"
)

adsl_merge_inputs <- teal.transform::merge_expression_module(
id = "adsl_merge",
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
data_extract = list(arm_var = arm_var),
anl_name = "ANL_ADSL"
)
Expand Down
2 changes: 1 addition & 1 deletion R/tm_t_pp_basic_info.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ srv_t_basic_info <- function(id,

anl_inputs <- teal.transform::merge_expression_srv(
datasets = data,
join_keys = get_join_keys(data),
join_keys = teal.data::get_join_keys(data),
selector_list = selector_list,
merge_function = "dplyr::left_join"
)
Expand Down
Loading

0 comments on commit 3e00585

Please sign in to comment.