diff --git a/book/graphs/efficacy/fstg01.qmd b/book/graphs/efficacy/fstg01.qmd index 049f9cfb38..53b1ddd08f 100644 --- a/book/graphs/efficacy/fstg01.qmd +++ b/book/graphs/efficacy/fstg01.qmd @@ -225,20 +225,20 @@ app <- init( tm_g_forest_rsp( label = "Forest Response", dataname = "ADRS", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(ADSL, c("ARM", "ARMCD")), "ARMCD" ), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADRS, "PARAMCD", "PARAM"), "BESRSPI" ), - subgroup_var = choices_selected( + subgroup_var = teal.transform::choices_selected( variable_choices(ADSL, names(ADSL)), c("BMRKR2", "SEX") ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( variable_choices(ADSL, c("STRATA1", "STRATA2")), "STRATA2" ), diff --git a/book/graphs/efficacy/fstg02.qmd b/book/graphs/efficacy/fstg02.qmd index faf00793f1..ebf507379a 100644 --- a/book/graphs/efficacy/fstg02.qmd +++ b/book/graphs/efficacy/fstg02.qmd @@ -227,10 +227,10 @@ app <- init( tm_g_forest_tte( label = "Forest Survival", dataname = "ADTTE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - subgroup_var = choices_selected(names(ADSL), c("SEX", "BMRKR2")), - paramcd = choices_selected(value_choices(ADTTE, "PARAMCD", "PARAM"), "OS"), - strata_var = choices_selected(c("STRATA1", "STRATA2"), "STRATA2"), + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + subgroup_var = teal.transform::choices_selected(names(ADSL), c("SEX", "BMRKR2")), + paramcd = teal.transform::choices_selected(value_choices(ADTTE, "PARAMCD", "PARAM"), "OS"), + strata_var = teal.transform::choices_selected(c("STRATA1", "STRATA2"), "STRATA2"), plot_height = c(600, 200, 2000), plot_width = c(1500, 200, 5000) ) diff --git a/book/graphs/efficacy/mmrmg01.qmd b/book/graphs/efficacy/mmrmg01.qmd index c785c09f48..82cbbdb1fb 100644 --- a/book/graphs/efficacy/mmrmg01.qmd +++ b/book/graphs/efficacy/mmrmg01.qmd @@ -154,17 +154,17 @@ app <- init( tm_a_mmrm( label = "MMRM", dataname = "ADQS", - aval_var = choices_selected(c("AVAL", "CHG"), "AVAL"), - id_var = choices_selected(c("USUBJID", "SUBJID"), "USUBJID"), - arm_var = choices_selected(c("ARM", "ARMCD"), "ARMCD"), - visit_var = choices_selected(c("AVISIT", "AVISITN"), "AVISIT"), + aval_var = teal.transform::choices_selected(c("AVAL", "CHG"), "AVAL"), + id_var = teal.transform::choices_selected(c("USUBJID", "SUBJID"), "USUBJID"), + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARMCD"), + visit_var = teal.transform::choices_selected(c("AVISIT", "AVISITN"), "AVISIT"), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADQS, "PARAMCD", "PARAM"), selected = "FKSI-FWB" ), - cov_var = choices_selected(c("BASE", "AGE", "SEX", "BASE:AVISIT"), NULL), - conf_level = choices_selected(c(0.95, 0.9, 0.8), 0.95) + cov_var = teal.transform::choices_selected(c("BASE", "AGE", "SEX", "BASE:AVISIT"), NULL), + conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95) ) ) ) diff --git a/book/graphs/other/ippg01.qmd b/book/graphs/other/ippg01.qmd index 330d15f9de..06bbab8896 100644 --- a/book/graphs/other/ippg01.qmd +++ b/book/graphs/other/ippg01.qmd @@ -120,33 +120,33 @@ app <- init( tm_g_ipp( label = "Individual Patient Plot", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( value_choices(ADLB, c("ARMCD")), "ARM A" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADLB, "PARAMCD"), "ALT" ), - aval_var = choices_selected( + aval_var = teal.transform::choices_selected( variable_choices(ADLB, c("AVAL")), "AVAL" ), - avalu_var = choices_selected( + avalu_var = teal.transform::choices_selected( variable_choices(ADLB, c("AVALU")), "AVALU", fixed = TRUE ), - id_var = choices_selected( + id_var = teal.transform::choices_selected( variable_choices(ADLB, c("USUBJID")), "USUBJID", fixed = TRUE ), - visit_var = choices_selected( + visit_var = teal.transform::choices_selected( variable_choices(ADLB, c("AVISIT")), "AVISIT" ), - baseline_var = choices_selected( + baseline_var = teal.transform::choices_selected( variable_choices(ADLB, c("BASE")), "BASE", fixed = TRUE diff --git a/book/graphs/other/kmg01.qmd b/book/graphs/other/kmg01.qmd index 444983f82a..a186de96ee 100644 --- a/book/graphs/other/kmg01.qmd +++ b/book/graphs/other/kmg01.qmd @@ -159,20 +159,20 @@ app <- init( label = "KM PLOT", plot_height = c(600, 100, 2000), dataname = "ADTTE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(ADSL, c("ARM", "ARMCD", "ACTARMCD")), "ARM" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADTTE, "PARAMCD", "PARAM"), "OS" ), arm_ref_comp = arm_ref_comp, - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( variable_choices(ADSL, c("SEX", "BMRKR2")), "SEX" ), - facet_var = choices_selected( + facet_var = teal.transform::choices_selected( variable_choices(ADSL, c("SEX", "BMRKR2")), NULL ) diff --git a/book/graphs/other/mng01.qmd b/book/graphs/other/mng01.qmd index e794c57e65..d3758bb797 100644 --- a/book/graphs/other/mng01.qmd +++ b/book/graphs/other/mng01.qmd @@ -174,15 +174,15 @@ app <- init( tm_g_lineplot( label = "LINE PLOT", dataname = "ADLB", - strata = choices_selected( + strata = teal.transform::choices_selected( variable_choices(ADSL, c("ARM", "ARMCD", "ACTARMCD")), "ARM" ), - y = choices_selected( + y = teal.transform::choices_selected( variable_choices(ADLB, c("AVAL", "BASE", "CHG", "PCHG")), "AVAL" ), - param = choices_selected( + param = teal.transform::choices_selected( value_choices(ADLB, "PARAMCD", "PARAM"), "ALT" ) diff --git a/book/tables/ECG/egt01.qmd b/book/tables/ECG/egt01.qmd index 3f92f26194..c15f763bad 100644 --- a/book/tables/ECG/egt01.qmd +++ b/book/tables/ECG/egt01.qmd @@ -113,20 +113,20 @@ app <- init( tm_t_summary_by( label = "ECG Results and Change from Baseline by Visit", dataname = "ADEG", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADEG, c("PARAM", "AVISIT")), selected = c("AVISIT") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADEG, c("AVAL", "CHG")), selected = c("AVAL") ), useNA = "ifany", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADEG, "PARAMCD", "PARAM"), selected = "HR" ), diff --git a/book/tables/ECG/egt02.qmd b/book/tables/ECG/egt02.qmd index f41a298914..ab24212b7f 100644 --- a/book/tables/ECG/egt02.qmd +++ b/book/tables/ECG/egt02.qmd @@ -104,16 +104,16 @@ app <- init( tm_t_abnormality( label = "Abnormality Table", dataname = "ADEG", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADEG, subset = c("EGCAT", "PARAM", "AVISIT")), selected = c("PARAM"), keep_order = TRUE ), - grade = choices_selected( + grade = teal.transform::choices_selected( choices = variable_choices(ADEG, subset = "ANRIND"), selected = "ANRIND", fixed = TRUE diff --git a/book/tables/ECG/egt03.qmd b/book/tables/ECG/egt03.qmd index ffe53c2583..eb1253012c 100644 --- a/book/tables/ECG/egt03.qmd +++ b/book/tables/ECG/egt03.qmd @@ -169,31 +169,31 @@ app <- init( tm_t_shift_by_arm( label = "Shift by Arm Table", dataname = "ADEG", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADEG, "PARAMCD"), selected = "HR" ), - visit_var = choices_selected( + visit_var = teal.transform::choices_selected( value_choices(ADEG, "AVISIT"), selected = "POST-BASELINE MINIMUM" ), - aval_var = choices_selected( + aval_var = teal.transform::choices_selected( variable_choices(ADEG, subset = "ANRIND"), selected = "ANRIND", fixed = TRUE ), - baseline_var = choices_selected( + baseline_var = teal.transform::choices_selected( variable_choices(ADEG, subset = "BNRIND"), selected = "BNRIND", fixed = TRUE ), - treatment_flag_var = choices_selected( + treatment_flag_var = teal.transform::choices_selected( variable_choices(ADEG, subset = "ONTRTFL"), selected = "ONTRTFL", fixed = TRUE ), - treatment_flag = choices_selected( + treatment_flag = teal.transform::choices_selected( value_choices(ADEG, "ONTRTFL"), selected = "Y", fixed = TRUE ) diff --git a/book/tables/ECG/egt05_qtcat.qmd b/book/tables/ECG/egt05_qtcat.qmd index 85e62e23ee..433b7e82e6 100644 --- a/book/tables/ECG/egt05_qtcat.qmd +++ b/book/tables/ECG/egt05_qtcat.qmd @@ -185,20 +185,20 @@ app <- init( tm_t_summary_by( label = "ECG Actual Values and Changes from Baseline by Visit", dataname = "ADEG", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADEG, c("PARAM", "AVISIT")), selected = c("AVISIT") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADEG, c("AVALCAT1", "CHGCAT1")), selected = c("AVALCAT1", "CHGCAT1") ), useNA = "ifany", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADEG, "PARAMCD", "PARAM"), selected = "QT" ) diff --git a/book/tables/adverse-events/aet01.qmd b/book/tables/adverse-events/aet01.qmd index 444b8975ef..81c45e8b9b 100644 --- a/book/tables/adverse-events/aet01.qmd +++ b/book/tables/adverse-events/aet01.qmd @@ -389,17 +389,17 @@ app <- init( tm_t_events_summary( label = "Adverse Events Summary", dataname = "ADAE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices("ADSL", c("ARM", "ARMCD")), selected = "ARM" ), - flag_var_anl = choices_selected( + flag_var_anl = teal.transform::choices_selected( choices = variable_choices("ADAE", ae_anl_vars), selected = ae_anl_vars[1], keep_order = TRUE, fixed = FALSE ), - flag_var_aesi = choices_selected( + flag_var_aesi = teal.transform::choices_selected( choices = variable_choices("ADAE", aesi_vars), selected = aesi_vars[1], keep_order = TRUE, diff --git a/book/tables/adverse-events/aet01_aesi.qmd b/book/tables/adverse-events/aet01_aesi.qmd index 8ddb1110a9..d9672e0312 100644 --- a/book/tables/adverse-events/aet01_aesi.qmd +++ b/book/tables/adverse-events/aet01_aesi.qmd @@ -563,11 +563,11 @@ app <- init( tm_t_events_summary( label = "Adverse Events Summary", dataname = "ADAE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices("ADSL", c("ARM", "ARMCD")), selected = "ARM" ), - flag_var_anl = choices_selected( + flag_var_anl = teal.transform::choices_selected( choices = variable_choices("ADAE", aesi_vars), selected = aesi_vars[1], keep_order = TRUE, diff --git a/book/tables/adverse-events/aet02.qmd b/book/tables/adverse-events/aet02.qmd index 2ad8ae47d2..35ad40617e 100644 --- a/book/tables/adverse-events/aet02.qmd +++ b/book/tables/adverse-events/aet02.qmd @@ -668,12 +668,12 @@ app <- init( tm_t_events( label = "Adverse Event Table", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = "AEBODSYS" ), diff --git a/book/tables/adverse-events/aet02_smq.qmd b/book/tables/adverse-events/aet02_smq.qmd index 567029c1a8..83e92d79af 100644 --- a/book/tables/adverse-events/aet02_smq.qmd +++ b/book/tables/adverse-events/aet02_smq.qmd @@ -193,11 +193,11 @@ ADAE <- data[["ADAE"]] names_baskets <- grep("^(SMQ|CQ).*NAM$", names(ADAE), value = TRUE) names_scopes <- grep("^SMQ.*SC$", names(ADAE), value = TRUE) -cs_baskets <- choices_selected( +cs_baskets <- teal.transform::choices_selected( choices = variable_choices(ADAE, subset = names_baskets), selected = names_baskets ) -cs_scopes <- choices_selected( +cs_scopes <- teal.transform::choices_selected( choices = variable_choices(ADAE, subset = names_scopes), selected = names_scopes, fixed = TRUE @@ -210,14 +210,14 @@ app <- init( tm_t_smq( label = "Adverse events by `SMQ` Table", dataname = "ADAE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "SEX")), selected = "ARM" ), add_total = FALSE, baskets = cs_baskets, scopes = cs_scopes, - llt = choices_selected( + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, subset = c("AEDECOD")), selected = "AEDECOD" ) diff --git a/book/tables/adverse-events/aet03.qmd b/book/tables/adverse-events/aet03.qmd index 97f685b19e..05f831919e 100644 --- a/book/tables/adverse-events/aet03.qmd +++ b/book/tables/adverse-events/aet03.qmd @@ -130,16 +130,16 @@ app <- init( tm_t_events_by_grade( label = "Adverse Events by Grade Table", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = "AEBODSYS" ), - grade = choices_selected( + grade = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETOXGR", "AESEV")), selected = "AESEV" ) diff --git a/book/tables/adverse-events/aet04.qmd b/book/tables/adverse-events/aet04.qmd index 63cfe96b70..605b75c6ff 100644 --- a/book/tables/adverse-events/aet04.qmd +++ b/book/tables/adverse-events/aet04.qmd @@ -585,16 +585,16 @@ app <- init( tm_t_events_by_grade( label = "Adverse Events by Grade Table", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = "AEBODSYS" ), - grade = choices_selected( + grade = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETOXGR", "AESEV")), selected = "AETOXGR" ) diff --git a/book/tables/adverse-events/aet04_pi.qmd b/book/tables/adverse-events/aet04_pi.qmd index 0f3df3f34b..a9fe96c885 100644 --- a/book/tables/adverse-events/aet04_pi.qmd +++ b/book/tables/adverse-events/aet04_pi.qmd @@ -396,17 +396,17 @@ app <- init( tm_t_events_by_grade( label = "Adverse Events by Grade Table", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), col_by_grade = TRUE, - llt = choices_selected( + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = "AEBODSYS" ), - grade = choices_selected( + grade = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETOXGR", "AESEV")), selected = "AETOXGR" ), diff --git a/book/tables/adverse-events/aet05.qmd b/book/tables/adverse-events/aet05.qmd index 8d6afa081a..6b70be2f06 100644 --- a/book/tables/adverse-events/aet05.qmd +++ b/book/tables/adverse-events/aet05.qmd @@ -107,15 +107,15 @@ app <- init( tm_t_events_patyear( label = "AE rate adjusted for patient-years at risk Table", dataname = "ADAETTE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARMCD" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADAETTE, "PARAMCD", "PARAM"), selected = "AETTE1" ), - events_var = choices_selected( + events_var = teal.transform::choices_selected( choices = variable_choices(ADAETTE, "n_events"), selected = "n_events", fixed = TRUE diff --git a/book/tables/adverse-events/aet05_all.qmd b/book/tables/adverse-events/aet05_all.qmd index b9197f6e8b..1c35ab9827 100644 --- a/book/tables/adverse-events/aet05_all.qmd +++ b/book/tables/adverse-events/aet05_all.qmd @@ -115,15 +115,15 @@ app <- init( tm_t_events_patyear( label = "AE Rate Adjusted for Patient-Years at Risk - All Occurrences Table", dataname = "ADAETTE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARMCD" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADAETTE, "PARAMCD"), selected = "AETOT1" ), - events_var = choices_selected( + events_var = teal.transform::choices_selected( choices = variable_choices(ADAETTE, "n_events"), selected = "n_events", fixed = TRUE diff --git a/book/tables/adverse-events/aet06.qmd b/book/tables/adverse-events/aet06.qmd index 47aa00838e..9db6b28b4a 100644 --- a/book/tables/adverse-events/aet06.qmd +++ b/book/tables/adverse-events/aet06.qmd @@ -393,12 +393,12 @@ app <- init( tm_t_events( label = "Adverse Event Table", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD", "SEX"), c("ARM", "SEX")), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD", "SEX"), c("ARM", "SEX")), + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = "AEBODSYS" ), diff --git a/book/tables/adverse-events/aet06_smq.qmd b/book/tables/adverse-events/aet06_smq.qmd index d24b97b24a..93e99530b7 100644 --- a/book/tables/adverse-events/aet06_smq.qmd +++ b/book/tables/adverse-events/aet06_smq.qmd @@ -281,11 +281,11 @@ ADAE <- data[["ADAE"]] names_baskets <- grep("^(SMQ|CQ).*NAM$", names(ADAE), value = TRUE) names_scopes <- grep("^SMQ.*SC$", names(ADAE), value = TRUE) -cs_baskets <- choices_selected( +cs_baskets <- teal.transform::choices_selected( choices = variable_choices(ADAE, subset = names_baskets), selected = names_baskets ) -cs_scopes <- choices_selected( +cs_scopes <- teal.transform::choices_selected( choices = variable_choices(ADAE, subset = names_scopes), selected = names_scopes, fixed = TRUE @@ -298,14 +298,14 @@ app <- init( tm_t_smq( label = "Adverse events by `SMQ` Table", dataname = "ADAE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "SEX", "AGE65")), selected = c("ARM", "SEX") ), add_total = FALSE, baskets = cs_baskets, scopes = cs_scopes, - llt = choices_selected( + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, subset = c("AEDECOD")), selected = "AEDECOD" ) diff --git a/book/tables/adverse-events/aet07.qmd b/book/tables/adverse-events/aet07.qmd index b0a53a76a6..84ed789a0e 100644 --- a/book/tables/adverse-events/aet07.qmd +++ b/book/tables/adverse-events/aet07.qmd @@ -163,12 +163,12 @@ app <- init( tm_t_events( label = "Adverse Event Table", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD", "SOC_PT")), selected = c("SOC_PT") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD", "SOC_PT")), selected = NULL ), diff --git a/book/tables/adverse-events/aet09.qmd b/book/tables/adverse-events/aet09.qmd index a1205c41ac..12cf91dee1 100644 --- a/book/tables/adverse-events/aet09.qmd +++ b/book/tables/adverse-events/aet09.qmd @@ -201,12 +201,12 @@ app <- init( tm_t_events( label = "Adverse Events Related to Study Drug", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AEBODSYS", "AEHLT")), selected = c("AEBODSYS") ), diff --git a/book/tables/adverse-events/aet09_smq.qmd b/book/tables/adverse-events/aet09_smq.qmd index ab45fd1bb1..25c884d68a 100644 --- a/book/tables/adverse-events/aet09_smq.qmd +++ b/book/tables/adverse-events/aet09_smq.qmd @@ -202,11 +202,11 @@ ADAE <- data[["ADAE"]] names_baskets <- grep("^(SMQ|CQ).*NAM$", names(ADAE), value = TRUE) names_scopes <- grep("^SMQ.*SC$", names(ADAE), value = TRUE) -cs_baskets <- choices_selected( +cs_baskets <- teal.transform::choices_selected( choices = variable_choices(ADAE, subset = names_baskets), selected = names_baskets ) -cs_scopes <- choices_selected( +cs_scopes <- teal.transform::choices_selected( choices = variable_choices(ADAE, subset = names_scopes), selected = names_scopes, fixed = TRUE @@ -219,14 +219,14 @@ app <- init( tm_t_smq( label = "Adverse Events by SMQ Table", dataname = "ADAE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "SEX")), selected = "ARM" ), add_total = FALSE, baskets = cs_baskets, scopes = cs_scopes, - llt = choices_selected( + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, subset = c("AEDECOD")), selected = "AEDECOD" ) diff --git a/book/tables/adverse-events/aet10.qmd b/book/tables/adverse-events/aet10.qmd index d80d950d87..a3f8a759a6 100644 --- a/book/tables/adverse-events/aet10.qmd +++ b/book/tables/adverse-events/aet10.qmd @@ -132,12 +132,12 @@ app <- init( tm_t_events( label = "Adverse Event Table", dataname = "ADAE", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AETERM", "AEDECOD")), selected = c("AEDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADAE, c("AEBODSYS", "AESOC")), selected = NULL ), diff --git a/book/tables/concomitant-medications/cmt01.qmd b/book/tables/concomitant-medications/cmt01.qmd index e3bb458c33..e4dc61db85 100644 --- a/book/tables/concomitant-medications/cmt01.qmd +++ b/book/tables/concomitant-medications/cmt01.qmd @@ -266,12 +266,12 @@ app <- init( tm_t_events( label = "Concomitant Medication Table", dataname = "ADCM", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADCM, "CMDECOD"), selected = "CMDECOD" ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADCM, "CMCLAS"), selected = c("CMCLAS") ), diff --git a/book/tables/concomitant-medications/cmt01a.qmd b/book/tables/concomitant-medications/cmt01a.qmd index df32f6131b..c6956e5ccd 100644 --- a/book/tables/concomitant-medications/cmt01a.qmd +++ b/book/tables/concomitant-medications/cmt01a.qmd @@ -262,13 +262,13 @@ app <- init( tm_t_mult_events( label = "Concomitant Medications by Medication Class and Preferred Name", dataname = "ADCM", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - seq_var = choices_selected("CMSEQ", selected = "CMSEQ", fixed = TRUE), - hlt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + seq_var = teal.transform::choices_selected("CMSEQ", selected = "CMSEQ", fixed = TRUE), + hlt = teal.transform::choices_selected( choices = variable_choices(ADCM, c("ATC1", "ATC2", "ATC3", "ATC4")), selected = c("ATC2") ), - llt = choices_selected( + llt = teal.transform::choices_selected( choices = variable_choices(ADCM, c("CMDECOD")), selected = c("CMDECOD") ), diff --git a/book/tables/concomitant-medications/cmt01b.qmd b/book/tables/concomitant-medications/cmt01b.qmd index e4e2908cc1..dc8c276d5a 100644 --- a/book/tables/concomitant-medications/cmt01b.qmd +++ b/book/tables/concomitant-medications/cmt01b.qmd @@ -293,13 +293,13 @@ app <- init( tm_t_mult_events( label = "Concomitant Medications by Medication Class and Preferred Name", dataname = "ADCM", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - seq_var = choices_selected("CMSEQ", selected = "CMSEQ", fixed = TRUE), - hlt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + seq_var = teal.transform::choices_selected("CMSEQ", selected = "CMSEQ", fixed = TRUE), + hlt = teal.transform::choices_selected( choices = variable_choices(ADCM, c("ATC1", "ATC2", "ATC3", "ATC4")), selected = c("ATC1", "ATC2", "ATC3", "ATC4") ), - llt = choices_selected( + llt = teal.transform::choices_selected( choices = variable_choices(ADCM, c("CMDECOD")), selected = c("CMDECOD") ), diff --git a/book/tables/concomitant-medications/cmt02_pt.qmd b/book/tables/concomitant-medications/cmt02_pt.qmd index db0b8205b9..5c25d4a08f 100644 --- a/book/tables/concomitant-medications/cmt02_pt.qmd +++ b/book/tables/concomitant-medications/cmt02_pt.qmd @@ -105,13 +105,13 @@ app <- init( tm_t_mult_events( label = "Concomitant Medications by Medication Class and Preferred Name", dataname = "ADCM", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - seq_var = choices_selected("CMSEQ", selected = "CMSEQ", fixed = TRUE), - hlt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + seq_var = teal.transform::choices_selected("CMSEQ", selected = "CMSEQ", fixed = TRUE), + hlt = teal.transform::choices_selected( choices = variable_choices(ADCM, c("ATC1", "ATC2", "ATC3", "ATC4")), selected = c("ATC1") ), - llt = choices_selected( + llt = teal.transform::choices_selected( choices = variable_choices(ADCM, c("CMDECOD")), selected = c("CMDECOD") ), diff --git a/book/tables/demography/dmt01.qmd b/book/tables/demography/dmt01.qmd index 1f5d030ec3..365f9ef446 100644 --- a/book/tables/demography/dmt01.qmd +++ b/book/tables/demography/dmt01.qmd @@ -223,8 +223,8 @@ app <- init( tm_t_summary( label = "Demographic Table", dataname = "ADSL", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - summarize_vars = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + summarize_vars = teal.transform::choices_selected( c("SEX", "RACE", "BMRKR2", "EOSDY", "DCSREAS"), c("SEX", "RACE") ), diff --git a/book/tables/disposition/dst01.qmd b/book/tables/disposition/dst01.qmd index 4263a51386..f8fe874e0b 100644 --- a/book/tables/disposition/dst01.qmd +++ b/book/tables/disposition/dst01.qmd @@ -165,8 +165,8 @@ app <- init( tm_t_summary( label = "Disposition Table", dataname = "ADSL", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - summarize_vars = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + summarize_vars = teal.transform::choices_selected( variable_choices(ADSL, demog_vars_asl), c("EOSSTT", "DCSREAS", "EOTSTT") ), diff --git a/book/tables/disposition/pdt01.qmd b/book/tables/disposition/pdt01.qmd index 86f987ffca..81c06c069e 100644 --- a/book/tables/disposition/pdt01.qmd +++ b/book/tables/disposition/pdt01.qmd @@ -96,12 +96,12 @@ app <- init( tm_t_events( label = "Major Protocol Deviations Table", dataname = "ADDV", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADDV, c("DVTERM")), selected = c("DVTERM") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADDV, c("DVDECOD")), selected = "DVDECOD" ), diff --git a/book/tables/efficacy/aovt01.qmd b/book/tables/efficacy/aovt01.qmd index 4ff5e528a9..58fd4fd97a 100644 --- a/book/tables/efficacy/aovt01.qmd +++ b/book/tables/efficacy/aovt01.qmd @@ -103,24 +103,24 @@ app <- init( tm_t_ancova( label = "ANCOVA table", dataname = "ADQS", - avisit = choices_selected( + avisit = teal.transform::choices_selected( choices = value_choices(ADQS, "AVISIT"), selected = "WEEK 1 DAY 8" ), - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ACTARMCD")), selected = "ARM" ), arm_ref_comp = arm_ref_comp, - aval_var = choices_selected( + aval_var = teal.transform::choices_selected( choices = variable_choices(ADQS, c("CHG", "AVAL")), selected = "CHG" ), - cov_var = choices_selected( + cov_var = teal.transform::choices_selected( choices = variable_choices(ADQS, c("BASE", "STRATA1", "SEX")), selected = "STRATA1" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADQS, "PARAMCD", "PARAM"), selected = c("FKSI-FWB", "BFIALL") ) diff --git a/book/tables/efficacy/aovt02.qmd b/book/tables/efficacy/aovt02.qmd index 7f86ea47e8..4249835bd1 100644 --- a/book/tables/efficacy/aovt02.qmd +++ b/book/tables/efficacy/aovt02.qmd @@ -111,24 +111,24 @@ app <- init( tm_t_ancova( label = "ANCOVA table", dataname = "ADQS", - avisit = choices_selected( + avisit = teal.transform::choices_selected( choices = value_choices(ADQS, "AVISIT"), selected = "WEEK 1 DAY 8" ), - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ACTARMCD")), selected = "ARM" ), arm_ref_comp = arm_ref_comp, - aval_var = choices_selected( + aval_var = teal.transform::choices_selected( choices = variable_choices(ADQS, c("CHG", "AVAL")), selected = "CHG" ), - cov_var = choices_selected( + cov_var = teal.transform::choices_selected( choices = variable_choices(ADQS, c("BASE", "STRATA1", "SEX")), selected = "STRATA1" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADQS, "PARAMCD", "PARAM"), selected = "FKSI-FWB" ) diff --git a/book/tables/efficacy/cfbt01.qmd b/book/tables/efficacy/cfbt01.qmd index a7da31e92f..6569e51f87 100644 --- a/book/tables/efficacy/cfbt01.qmd +++ b/book/tables/efficacy/cfbt01.qmd @@ -121,20 +121,20 @@ app <- init( tm_t_summary_by( label = "Efficacy Data and Change from Baseline by Visit", dataname = "ADQS", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADQS, c("PARAM", "AVISIT")), selected = c("AVISIT") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADQS, c("AVAL", "CHG")), selected = c("AVAL", "CHG") ), useNA = "ifany", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADQS, "PARAMCD", "PARAM"), selected = "BFIALL" ), diff --git a/book/tables/efficacy/cmht01.qmd b/book/tables/efficacy/cmht01.qmd index 6920bf1286..d109162913 100644 --- a/book/tables/efficacy/cmht01.qmd +++ b/book/tables/efficacy/cmht01.qmd @@ -167,16 +167,16 @@ app <- init( tm_t_binary_outcome( label = "Responders", dataname = "ADRS", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADRS, "PARAMCD", "PARAM"), selected = "BESRSPI" ), - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADRS, c("ARM", "ARMCD", "ACTARMCD")), selected = "ARM" ), arm_ref_comp = arm_ref_comp, - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( choices = variable_choices(ADRS, c("SEX", "BMRKR2")), select = NULL ) diff --git a/book/tables/efficacy/coxt01.qmd b/book/tables/efficacy/coxt01.qmd index 423787ba50..5558eea4db 100644 --- a/book/tables/efficacy/coxt01.qmd +++ b/book/tables/efficacy/coxt01.qmd @@ -205,15 +205,15 @@ app <- init( tm_t_coxreg( label = "Cox Reg.", dataname = "ADTTE", - arm_var = choices_selected(c("ARM", "ARMCD", "ACTARMCD"), "ARM"), + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD", "ACTARMCD"), "ARM"), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADTTE, "PARAMCD", "PARAM"), "OS" ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( c("SEX", "STRATA1", "STRATA2"), NULL ), - cov_var = choices_selected( + cov_var = teal.transform::choices_selected( c("AGE", "SEX", "RACE"), "AGE" ), multivariate = FALSE diff --git a/book/tables/efficacy/coxt02.qmd b/book/tables/efficacy/coxt02.qmd index 017f935275..17747eb7c7 100644 --- a/book/tables/efficacy/coxt02.qmd +++ b/book/tables/efficacy/coxt02.qmd @@ -170,15 +170,15 @@ app <- init( tm_t_coxreg( label = "Cox Reg.", dataname = "ADTTE", - arm_var = choices_selected(c("ARM", "ARMCD", "ACTARMCD"), "ARM"), + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD", "ACTARMCD"), "ARM"), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADTTE, "PARAMCD", "PARAM"), "OS" ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( c("SEX", "STRATA1", "STRATA2"), NULL ), - cov_var = choices_selected( + cov_var = teal.transform::choices_selected( c("AGE", "SEX", "RACE"), c("AGE", "SEX") ), multivariate = TRUE diff --git a/book/tables/efficacy/dort01.qmd b/book/tables/efficacy/dort01.qmd index edfbf9ba94..690e938b62 100644 --- a/book/tables/efficacy/dort01.qmd +++ b/book/tables/efficacy/dort01.qmd @@ -302,21 +302,21 @@ app <- init( tm_t_tte( label = "Time To Event Table", dataname = "ADTTE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(ADSL, c("ARM", "ARMCD", "ACTARMCD")), "ARM" ), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADTTE, "PARAMCD", "PARAM"), "CRSD" ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( variable_choices(ADSL, c("SEX", "BMRKR2")), "SEX" ), - time_points = choices_selected(c(6, 8), 6), - event_desc_var = choices_selected( + time_points = teal.transform::choices_selected(c(6, 8), 6), + event_desc_var = teal.transform::choices_selected( variable_choices(ADTTE, "EVNTDESC"), "EVNTDESC", fixed = TRUE diff --git a/book/tables/efficacy/lgrt02.qmd b/book/tables/efficacy/lgrt02.qmd index 711c82306d..3693f5dc06 100644 --- a/book/tables/efficacy/lgrt02.qmd +++ b/book/tables/efficacy/lgrt02.qmd @@ -191,16 +191,16 @@ app <- init( tm_t_logistic( label = "Logistic Regression", dataname = "ADRS", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADRS, c("ARM", "ARMCD")), selected = "ARM" ), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADRS, "PARAMCD", "PARAM"), selected = "BESRSPI" ), - cov_var = choices_selected( + cov_var = teal.transform::choices_selected( choices = c("SEX", "AGE", "BMRKR1", "BMRKR2"), selected = "SEX" ) diff --git a/book/tables/efficacy/mmrmt01.qmd b/book/tables/efficacy/mmrmt01.qmd index a28cc42803..a3f8b8fc67 100644 --- a/book/tables/efficacy/mmrmt01.qmd +++ b/book/tables/efficacy/mmrmt01.qmd @@ -252,17 +252,17 @@ app <- init( tm_a_mmrm( label = "MMRM", dataname = "ADQS", - aval_var = choices_selected(c("AVAL", "CHG"), "CHG"), - id_var = choices_selected(c("USUBJID", "SUBJID"), "USUBJID"), - arm_var = choices_selected(c("ARM", "ARMCD"), "ARMCD"), - visit_var = choices_selected(c("AVISIT", "AVISITN"), "AVISIT"), + aval_var = teal.transform::choices_selected(c("AVAL", "CHG"), "CHG"), + id_var = teal.transform::choices_selected(c("USUBJID", "SUBJID"), "USUBJID"), + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARMCD"), + visit_var = teal.transform::choices_selected(c("AVISIT", "AVISITN"), "AVISIT"), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADQS, "PARAMCD", "PARAM"), selected = "FKSI-FWB" ), - cov_var = choices_selected(c("BASE", "AGE", "SEX", "BASE:AVISIT"), NULL), - conf_level = choices_selected(c(0.95, 0.9, 0.8), 0.95) + cov_var = teal.transform::choices_selected(c("BASE", "AGE", "SEX", "BASE:AVISIT"), NULL), + conf_level = teal.transform::choices_selected(c(0.95, 0.9, 0.8), 0.95) ) ) ) diff --git a/book/tables/efficacy/onct05.qmd b/book/tables/efficacy/onct05.qmd index 7ea56596c1..ec05292f17 100644 --- a/book/tables/efficacy/onct05.qmd +++ b/book/tables/efficacy/onct05.qmd @@ -178,20 +178,20 @@ app <- init( tm_g_forest_rsp( label = "Forest Response", dataname = "ADRS", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(ADSL, c("ARM", "ARMCD")), "ARMCD" ), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADRS, "PARAMCD", "PARAM"), "BESRSPI" ), - subgroup_var = choices_selected( + subgroup_var = teal.transform::choices_selected( variable_choices(ADSL, names(ADSL)), c("SEX") ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( variable_choices(ADSL, c("STRATA1", "STRATA2")), "STRATA2" ), diff --git a/book/tables/efficacy/rspt01.qmd b/book/tables/efficacy/rspt01.qmd index ddcd8644f9..9a88d4369c 100644 --- a/book/tables/efficacy/rspt01.qmd +++ b/book/tables/efficacy/rspt01.qmd @@ -291,16 +291,16 @@ app <- init( tm_t_binary_outcome( label = "Responders", dataname = "ADRS", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADRS, "PARAMCD", "PARAM"), selected = "BESRSPI" ), - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADRS, c("ARM", "ARMCD", "ACTARMCD", "Dum_ARM")), selected = "ARM" ), arm_ref_comp = arm_ref_comp, - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( choices = variable_choices(ADRS, c("SEX", "BMRKR2")), select = NULL ), diff --git a/book/tables/efficacy/ttet01.qmd b/book/tables/efficacy/ttet01.qmd index 41ade0d57f..afe9268762 100644 --- a/book/tables/efficacy/ttet01.qmd +++ b/book/tables/efficacy/ttet01.qmd @@ -434,21 +434,21 @@ app <- init( tm_t_tte( label = "Time To Event Table", dataname = "ADTTE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(ADSL, c("ARM", "ARMCD", "ACTARMCD")), "ARM" ), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADTTE, "PARAMCD", "PARAM"), "OS" ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( variable_choices(ADSL, c("SEX", "BMRKR2")), "SEX" ), - time_points = choices_selected(c(6, 8), 6), - event_desc_var = choices_selected( + time_points = teal.transform::choices_selected(c(6, 8), 6), + event_desc_var = teal.transform::choices_selected( variable_choices(ADTTE, "EVNTDESC"), "EVNTDESC", fixed = TRUE diff --git a/book/tables/exposure/ext01.qmd b/book/tables/exposure/ext01.qmd index 44e16025b7..d9ff709e7b 100644 --- a/book/tables/exposure/ext01.qmd +++ b/book/tables/exposure/ext01.qmd @@ -237,23 +237,23 @@ app <- init( tm_t_summary_by( label = "Exposure Table", dataname = "ADEX", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADEX, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADEX, c("PARCAT2", "PARAM")), selected = c("PARCAT2", "PARAM") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADEX, c("AVAL", "AVALCAT1")), selected = c("AVAL", "AVALCAT1") ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADEX, "PARAMCD", "PARAM"), selected = c("TDOSE", "TNDOSE") ), - denominator = choices_selected( + denominator = teal.transform::choices_selected( choices = c("n", "N", "omit"), selected = "N" ) diff --git a/book/tables/lab-results/lbt01.qmd b/book/tables/lab-results/lbt01.qmd index cd617f874e..90b3f343b0 100644 --- a/book/tables/lab-results/lbt01.qmd +++ b/book/tables/lab-results/lbt01.qmd @@ -118,20 +118,20 @@ app <- init( tm_t_summary_by( label = "Laboratory Test Results and Change from Baseline by Visit", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, c("PARAM", "AVISIT")), selected = c("AVISIT") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, c("AVAL", "CHG")), selected = c("AVAL", "CHG") ), useNA = "ifany", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADLB, "PARAMCD", "PARAM"), selected = "ALT" ), diff --git a/book/tables/lab-results/lbt02.qmd b/book/tables/lab-results/lbt02.qmd index 0d45f0d929..24423652e2 100644 --- a/book/tables/lab-results/lbt02.qmd +++ b/book/tables/lab-results/lbt02.qmd @@ -93,20 +93,20 @@ app <- init( tm_t_summary_by( label = "Laboratory Test Results by Visit", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, c("PARAM", "AVISIT")), # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT` selected = c("PARAM", "AVISIT") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, c("AVAL")), selected = c("AVAL") ), useNA = "ifany", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADLB, "PARAMCD", "PARAM"), selected = "ALT" ) diff --git a/book/tables/lab-results/lbt03.qmd b/book/tables/lab-results/lbt03.qmd index 18a2c39bb8..d30e1e7712 100644 --- a/book/tables/lab-results/lbt03.qmd +++ b/book/tables/lab-results/lbt03.qmd @@ -166,20 +166,20 @@ app <- init( tm_t_summary_by( label = "Laboratory Test Results Change from Baseline by Visit", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, c("PARAM", "AVISIT_header")), # note: order matters here. If `PARAM` is first, the split will be first by `PARAM`and then by `AVISIT` selected = c("PARAM", "AVISIT_header") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, c("AVAL", "CHG", "AVAL_CHG")), selected = c("AVAL_CHG") ), useNA = "ifany", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADLB, "PARAMCD", "PARAM"), selected = "CRP" ) diff --git a/book/tables/lab-results/lbt04.qmd b/book/tables/lab-results/lbt04.qmd index ff172af6b6..cb37073190 100644 --- a/book/tables/lab-results/lbt04.qmd +++ b/book/tables/lab-results/lbt04.qmd @@ -86,16 +86,16 @@ app <- init( tm_t_abnormality( label = "Abnormality Table", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("LBCAT", "PARAM", "AVISIT")), selected = c("LBCAT", "PARAM"), keep_order = TRUE ), - grade = choices_selected( + grade = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = "ANRIND"), selected = "ANRIND", fixed = TRUE diff --git a/book/tables/lab-results/lbt07.qmd b/book/tables/lab-results/lbt07.qmd index d769bf4b9f..0c6b79cc6e 100644 --- a/book/tables/lab-results/lbt07.qmd +++ b/book/tables/lab-results/lbt07.qmd @@ -135,11 +135,11 @@ app <- init( tm_t_abnormality_by_worst_grade( label = "Laboratory Test Results with Highest Grade Post-Baseline", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADLB, "PARAMCD", "PARAM"), selected = c("ALT", "CRP", "IGA") ), diff --git a/book/tables/lab-results/lbt11.qmd b/book/tables/lab-results/lbt11.qmd index 91105964e2..7496638d57 100644 --- a/book/tables/lab-results/lbt11.qmd +++ b/book/tables/lab-results/lbt11.qmd @@ -177,21 +177,21 @@ app <- init( tm_t_tte( label = "Time To LLT Event Table", dataname = "ADAETTE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(data[["ADSL"]], c("ARM", "ARMCD", "ACTARMCD")), "ARM" ), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(data[["ADAETTE"]], "PARAMCD", "PARAM"), "HYSTTEUL" ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( variable_choices(data[["ADSL"]], c("RACE", "SEX")), c("RACE", "SEX") ), - time_points = choices_selected(0, NULL), - event_desc_var = choices_selected("EVNTDESC", "EVNTDESC", fixed = TRUE) + time_points = teal.transform::choices_selected(0, NULL), + event_desc_var = teal.transform::choices_selected("EVNTDESC", "EVNTDESC", fixed = TRUE) ) ) ) diff --git a/book/tables/lab-results/lbt11_bl.qmd b/book/tables/lab-results/lbt11_bl.qmd index 994cc15b20..339f1ffddd 100644 --- a/book/tables/lab-results/lbt11_bl.qmd +++ b/book/tables/lab-results/lbt11_bl.qmd @@ -178,21 +178,21 @@ app <- init( tm_t_tte( label = "Time To LLT Event Table", dataname = "ADAETTE", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( variable_choices(ADSL, c("ARM", "ARMCD", "ACTARMCD")), "ARM" ), arm_ref_comp = arm_ref_comp, - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( value_choices(ADAETTE, "PARAMCD", "PARAM"), "HYSTTEBL" ), - strata_var = choices_selected( + strata_var = teal.transform::choices_selected( variable_choices(ADSL, c("RACE", "SEX")), c("RACE", "SEX") ), - time_points = choices_selected(0, NULL), - event_desc_var = choices_selected("EVNTDESC", "EVNTDESC", fixed = TRUE) + time_points = teal.transform::choices_selected(0, NULL), + event_desc_var = teal.transform::choices_selected("EVNTDESC", "EVNTDESC", fixed = TRUE) ) ) ) diff --git a/book/tables/lab-results/lbt13.qmd b/book/tables/lab-results/lbt13.qmd index cca87ba93c..40e298ca8d 100644 --- a/book/tables/lab-results/lbt13.qmd +++ b/book/tables/lab-results/lbt13.qmd @@ -443,28 +443,28 @@ app <- init( tm_t_shift_by_grade( label = "Grade Laboratory Abnormality Table", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADLB, "PARAMCD", "PARAM"), selected = "ALT" ), - worst_flag_var = choices_selected( + worst_flag_var = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("WGRLOVFL", "WGRLOFL", "WGRHIVFL", "WGRHIFL")), selected = c("WGRLOVFL") ), - worst_flag_indicator = choices_selected( + worst_flag_indicator = teal.transform::choices_selected( value_choices(ADLB, "WGRLOVFL"), selected = "Y", fixed = TRUE ), - anl_toxgrade_var = choices_selected( + anl_toxgrade_var = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("ATOXGR")), selected = c("ATOXGR"), fixed = TRUE ), - base_toxgrade_var = choices_selected( + base_toxgrade_var = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("BTOXGR")), selected = c("BTOXGR"), fixed = TRUE diff --git a/book/tables/lab-results/lbt14.qmd b/book/tables/lab-results/lbt14.qmd index ef9d06bba4..29c3e5198d 100644 --- a/book/tables/lab-results/lbt14.qmd +++ b/book/tables/lab-results/lbt14.qmd @@ -345,28 +345,28 @@ app <- init( tm_t_shift_by_grade( label = "Grade Laboratory Abnormality Table", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADLB, "PARAMCD", "PARAM"), selected = "ALT" ), - worst_flag_var = choices_selected( + worst_flag_var = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("WGRLOVFL", "WGRLOFL", "WGRHIVFL", "WGRHIFL")), selected = c("WGRHIFL") ), - worst_flag_indicator = choices_selected( + worst_flag_indicator = teal.transform::choices_selected( value_choices(ADLB, "WGRLOVFL"), selected = "Y", fixed = TRUE ), - anl_toxgrade_var = choices_selected( + anl_toxgrade_var = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("ATOXGR")), selected = c("ATOXGR"), fixed = TRUE ), - base_toxgrade_var = choices_selected( + base_toxgrade_var = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("BTOXGR")), selected = c("BTOXGR"), fixed = TRUE diff --git a/book/tables/lab-results/lbt15.qmd b/book/tables/lab-results/lbt15.qmd index 67d50cf909..328a504684 100644 --- a/book/tables/lab-results/lbt15.qmd +++ b/book/tables/lab-results/lbt15.qmd @@ -146,21 +146,21 @@ app <- init( tm_t_abnormality( label = "Abnormality Table", dataname = "ADLB", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = c("PARAM")), selected = c("PARAM"), keep_order = TRUE ), - grade = choices_selected( + grade = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = "ANRIND"), selected = "ANRIND", fixed = TRUE ), - baseline_var = choices_selected( + baseline_var = teal.transform::choices_selected( choices = variable_choices(ADLB, subset = "BNRIND"), selected = "BNRIND", fixed = TRUE diff --git a/book/tables/medical-history/mht01.qmd b/book/tables/medical-history/mht01.qmd index 4aeebbbd6f..946fe8622a 100644 --- a/book/tables/medical-history/mht01.qmd +++ b/book/tables/medical-history/mht01.qmd @@ -191,12 +191,12 @@ app <- init( tm_t_events( label = "Medical History Table", dataname = "ADMH", - arm_var = choices_selected(c("ARM", "ARMCD"), "ARM"), - llt = choices_selected( + arm_var = teal.transform::choices_selected(c("ARM", "ARMCD"), "ARM"), + llt = teal.transform::choices_selected( choices = variable_choices(ADMH, c("MHTERM", "MHDECOD")), selected = c("MHDECOD") ), - hlt = choices_selected( + hlt = teal.transform::choices_selected( choices = variable_choices(ADMH, c("MHBODSYS", "MHSOC")), selected = "MHBODSYS" ), diff --git a/book/tables/risk-management-plan/rmpt01.qmd b/book/tables/risk-management-plan/rmpt01.qmd index 8d88d74394..66ed42cf90 100644 --- a/book/tables/risk-management-plan/rmpt01.qmd +++ b/book/tables/risk-management-plan/rmpt01.qmd @@ -132,19 +132,19 @@ app <- init( tm_t_exposure( label = "Duration of Exposure Table", dataname = "ADEX", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADEX, "PARAMCD", "PARAM"), selected = "TDURD" ), - col_by_var = choices_selected( + col_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("SEX", "ARM")), selected = NULL ), - row_by_var = choices_selected( + row_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("aval_months_cat", "RACE", "STRATA1", "SEX")), selected = "aval_months_cat" ), - parcat = choices_selected( + parcat = teal.transform::choices_selected( choices = value_choices(ADEX, "PARCAT2"), selected = "Drug A" ), diff --git a/book/tables/risk-management-plan/rmpt03.qmd b/book/tables/risk-management-plan/rmpt03.qmd index 5d1aec4951..11f74c080b 100644 --- a/book/tables/risk-management-plan/rmpt03.qmd +++ b/book/tables/risk-management-plan/rmpt03.qmd @@ -178,19 +178,19 @@ app <- init( tm_t_exposure( label = "Duration of Exposure Table", dataname = "ADEX", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADEX, "PARAMCD", "PARAM"), selected = "TDURD" ), - col_by_var = choices_selected( + col_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("SEX", "ARM")), selected = "SEX" ), - row_by_var = choices_selected( + row_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("AGEGR1", "AGEGR2")), selected = "AGEGR1" ), - parcat = choices_selected( + parcat = teal.transform::choices_selected( choices = value_choices(ADEX, "PARCAT2"), selected = "Drug A" ), diff --git a/book/tables/risk-management-plan/rmpt04.qmd b/book/tables/risk-management-plan/rmpt04.qmd index 907a3df4f0..0dbe75e5ec 100644 --- a/book/tables/risk-management-plan/rmpt04.qmd +++ b/book/tables/risk-management-plan/rmpt04.qmd @@ -113,19 +113,19 @@ app <- init( tm_t_exposure( label = "Duration of Exposure Table", dataname = "ADEX", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADEX, "PARAMCD", "PARAM"), selected = "TDURD" ), - col_by_var = choices_selected( + col_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("ARM")), selected = NULL ), - row_by_var = choices_selected( + row_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("ETHNIC", "SEX")), selected = "ETHNIC" ), - parcat = choices_selected( + parcat = teal.transform::choices_selected( choices = value_choices(ADEX, "PARCAT2"), selected = "Drug A" ), diff --git a/book/tables/risk-management-plan/rmpt05.qmd b/book/tables/risk-management-plan/rmpt05.qmd index 3ce0c24878..cec64ab269 100644 --- a/book/tables/risk-management-plan/rmpt05.qmd +++ b/book/tables/risk-management-plan/rmpt05.qmd @@ -115,19 +115,19 @@ app <- init( tm_t_exposure( label = "Duration of Exposure Table", dataname = "ADEX", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADEX, "PARAMCD", "PARAM"), selected = "TDURD" ), - col_by_var = choices_selected( + col_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("SEX", "ARM")), selected = NULL ), - row_by_var = choices_selected( + row_by_var = teal.transform::choices_selected( choices = variable_choices(ADEX, subset = c("RACE", "STRATA1", "SEX")), selected = "RACE" ), - parcat = choices_selected( + parcat = teal.transform::choices_selected( choices = value_choices(ADEX, "PARCAT2"), selected = "Drug A" ), diff --git a/book/tables/safety/enrollment01.qmd b/book/tables/safety/enrollment01.qmd index ac8e897d52..24e5b55481 100644 --- a/book/tables/safety/enrollment01.qmd +++ b/book/tables/safety/enrollment01.qmd @@ -172,19 +172,19 @@ app <- init( tm_t_summary_by( label = "Enrollment Table", dataname = "ADSL", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADSL, c("REGION1", "COUNTRY", "SITEID", "INVID", "INVNAM", "INVID_INVNAM")), selected = c("REGION1") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADSL, c("REGION1", "COUNTRY", "SITEID", "INVID", "INVNAM", "INVID_INVNAM")), selected = c("SITEID") ), - denominator = choices_selected( + denominator = teal.transform::choices_selected( choices = c("n", "N", "omit"), selected = "N", fixed = TRUE diff --git a/book/tables/vital-signs/vst01.qmd b/book/tables/vital-signs/vst01.qmd index 297bb532c4..82f7760750 100644 --- a/book/tables/vital-signs/vst01.qmd +++ b/book/tables/vital-signs/vst01.qmd @@ -191,20 +191,20 @@ app <- init( tm_t_summary_by( label = "Vital Sign Results and Change from Baseline by Visit", dataname = "ADVS", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADVS, c("PARAM", "AVISIT")), selected = c("AVISIT", "PARAM") ), - summarize_vars = choices_selected( + summarize_vars = teal.transform::choices_selected( choices = variable_choices(ADVS, c("AVAL", "CHG")), selected = c("AVAL", "CHG") ), useNA = "ifany", - paramcd = choices_selected( + paramcd = teal.transform::choices_selected( choices = value_choices(ADVS, "PARAMCD", "PARAM"), selected = "DIABP" ), diff --git a/book/tables/vital-signs/vst02.qmd b/book/tables/vital-signs/vst02.qmd index 1208524a79..4480396560 100644 --- a/book/tables/vital-signs/vst02.qmd +++ b/book/tables/vital-signs/vst02.qmd @@ -110,16 +110,16 @@ app <- init( tm_t_abnormality( label = "Abnormality Table", dataname = "ADVS", - arm_var = choices_selected( + arm_var = teal.transform::choices_selected( choices = variable_choices(ADSL, subset = c("ARM", "ARMCD")), selected = "ARM" ), - by_vars = choices_selected( + by_vars = teal.transform::choices_selected( choices = variable_choices(ADVS, subset = c("VSCAT", "PARAM", "AVISIT")), selected = c("PARAM"), keep_order = TRUE ), - grade = choices_selected( + grade = teal.transform::choices_selected( choices = variable_choices(ADVS, subset = "ANRIND"), selected = "ANRIND", fixed = TRUE diff --git a/package/DESCRIPTION b/package/DESCRIPTION index 610e78680c..b7c1fea4f1 100644 --- a/package/DESCRIPTION +++ b/package/DESCRIPTION @@ -38,6 +38,7 @@ Suggests: teal (>= 0.14.0), teal.modules.clinical (>= 0.8.16), teal.modules.general (>= 0.2.16), + teal.transform (>= 0.5.0), tern (>= 0.9.3), tern.mmrm (>= 0.3.0), tern.rbmi, diff --git a/package/tests/testthat/_snaps/dsl02/markdown-snaps.md b/package/tests/testthat/_snaps/dsl02/markdown-snaps.md index a4ef1ced21..723d083d72 100644 --- a/package/tests/testthat/_snaps/dsl02/markdown-snaps.md +++ b/package/tests/testthat/_snaps/dsl02/markdown-snaps.md @@ -13,8 +13,8 @@ 5 C: Combination CHN-11/id-91 44/M/BLACK OR AFRICAN AMERICAN SSADTM EOSDY SSAEDY RANDEDY DCSREAS - 1 2020-11-21 00:00:00 455 455 455 DEATH - 2 2021-01-26 00:00:00 388 388 388 DEATH + 1 2020-11-22 00:00:00 455 454 455 DEATH + 2 2021-01-27 00:00:00 388 387 388 DEATH 3 2019-10-02 00:00:00 865 864 868 DEATH 4 2020-03-10 00:00:00 705 705 707 LACK OF EFFICACY 5 2020-05-29 00:00:00 625 625 626 DEATH diff --git a/package/tests/testthat/test-graph-snaps.R b/package/tests/testthat/test-graph-snaps.R index 068443f590..62ddcf605c 100644 --- a/package/tests/testthat/test-graph-snaps.R +++ b/package/tests/testthat/test-graph-snaps.R @@ -23,6 +23,7 @@ if (length(skip_tests)) { # expect_snapshot_ggplot - set custom plot dimensions expect_snapshot_ggplot <- function(title, fig, width = NA, height = NA) { skip_if_not_installed("svglite") + skip_on_ci() name <- paste0(title, ".svg") path <- tempdir()