From 1fb2d9e4d79cefdb7c0c13204ec5499d0a784c62 Mon Sep 17 00:00:00 2001 From: ayogasekaram Date: Fri, 10 May 2024 21:58:01 +0000 Subject: [PATCH] replace usage of `scda` and `scda.2022` with `random.cdisc.data` --- book/_quarto.yml | 4 +- book/graphs/efficacy/fstg01.qmd | 42 +++++++------- book/graphs/efficacy/fstg02.qmd | 31 +++++----- book/graphs/efficacy/kmg01.qmd | 39 ++++++------- book/graphs/efficacy/mmrmg01.qmd | 21 ++++--- book/graphs/efficacy/mmrmg02.qmd | 11 ++-- book/graphs/other/brg01.qmd | 43 ++++++-------- book/graphs/other/bwg01.qmd | 48 ++++++---------- book/graphs/other/cig01.qmd | 35 +++++------- book/graphs/other/ippg01.qmd | 25 ++++----- book/graphs/other/ltg01.qmd | 42 +++++++------- book/graphs/other/mng01.qmd | 47 +++++++--------- book/graphs/pharmacokinetic/pkcg01.qmd | 17 +++--- book/graphs/pharmacokinetic/pkcg02.qmd | 17 +++--- book/graphs/pharmacokinetic/pkcg03.qmd | 19 +++---- book/graphs/pharmacokinetic/pkpg01.qmd | 17 +++--- book/graphs/pharmacokinetic/pkpg02.qmd | 19 +++---- book/graphs/pharmacokinetic/pkpg03.qmd | 13 ++--- book/graphs/pharmacokinetic/pkpg04.qmd | 13 ++--- book/graphs/pharmacokinetic/pkpg06.qmd | 25 ++++----- book/listings/ADA/adal02.qmd | 12 ++-- book/listings/ECG/egl01.qmd | 12 ++-- book/listings/adverse-events/ael01.qmd | 12 ++-- book/listings/adverse-events/ael01_nollt.qmd | 12 ++-- book/listings/adverse-events/ael02.qmd | 12 ++-- book/listings/adverse-events/ael02_ed.qmd | 12 ++-- book/listings/adverse-events/ael03.qmd | 12 ++-- book/listings/adverse-events/ael04.qmd | 12 ++-- .../concomitant-medications/cml01.qmd | 12 ++-- .../concomitant-medications/cml02a_gl.qmd | 12 ++-- .../concomitant-medications/cml02b_gl.qmd | 12 ++-- .../dsur4.qmd | 12 ++-- book/listings/disposition/dsl01.qmd | 12 ++-- book/listings/disposition/dsl02.qmd | 12 ++-- book/listings/efficacy/oncl01.qmd | 16 ++---- book/listings/exposure/exl01.qmd | 12 ++-- book/listings/lab-results/lbl01.qmd | 12 ++-- book/listings/lab-results/lbl01_rls.qmd | 12 ++-- book/listings/lab-results/lbl02a.qmd | 12 ++-- book/listings/lab-results/lbl02a_rls.qmd | 12 ++-- book/listings/lab-results/lbl02b.qmd | 12 ++-- book/listings/medical-history/mhl01.qmd | 12 ++-- book/listings/pharmacokinetic/pkcl01.qmd | 12 ++-- book/listings/pharmacokinetic/pkcl02.qmd | 12 ++-- book/listings/pharmacokinetic/pkpl01.qmd | 12 ++-- book/listings/pharmacokinetic/pkpl02.qmd | 12 ++-- book/listings/pharmacokinetic/pkpl04.qmd | 12 ++-- book/listings/vital-signs/vsl01.qmd | 12 ++-- book/tables/ADA/adat01.qmd | 15 ++--- book/tables/ADA/adat02.qmd | 14 ++--- book/tables/ADA/adat03.qmd | 16 ++---- book/tables/ADA/adat04a.qmd | 15 ++--- book/tables/ADA/adat04b.qmd | 15 ++--- book/tables/ECG/egt01.qmd | 21 +++---- book/tables/ECG/egt02.qmd | 23 +++----- book/tables/ECG/egt03.qmd | 21 +++---- book/tables/ECG/egt04.qmd | 14 ++--- book/tables/ECG/egt05_qtcat.qmd | 20 +++---- book/tables/adverse-events/aet01.qmd | 30 ++++------ book/tables/adverse-events/aet01_aesi.qmd | 39 +++++-------- book/tables/adverse-events/aet02.qmd | 56 +++++++------------ book/tables/adverse-events/aet02_smq.qmd | 23 +++----- book/tables/adverse-events/aet03.qmd | 22 +++----- book/tables/adverse-events/aet04.qmd | 46 ++++++--------- book/tables/adverse-events/aet04_pi.qmd | 42 +++++--------- book/tables/adverse-events/aet05.qmd | 25 +++------ book/tables/adverse-events/aet05_all.qmd | 24 +++----- book/tables/adverse-events/aet06.qmd | 36 +++++------- book/tables/adverse-events/aet06_smq.qmd | 27 ++++----- book/tables/adverse-events/aet07.qmd | 25 +++------ book/tables/adverse-events/aet09.qmd | 25 +++------ book/tables/adverse-events/aet09_smq.qmd | 25 +++------ book/tables/adverse-events/aet10.qmd | 25 +++------ book/tables/concomitant-medications/cmt01.qmd | 29 ++++------ .../tables/concomitant-medications/cmt01a.qmd | 31 ++++------ .../tables/concomitant-medications/cmt01b.qmd | 28 ++++------ .../concomitant-medications/cmt02_pt.qmd | 22 +++----- book/tables/deaths/dtht01.qmd | 21 +++---- book/tables/demography/dmt01.qmd | 34 ++++------- book/tables/disclosures/disclosurest01.qmd | 51 ++++++----------- book/tables/disclosures/eudrat01.qmd | 14 ++--- book/tables/disclosures/eudrat02.qmd | 12 ++-- book/tables/disposition/dst01.qmd | 24 +++----- book/tables/disposition/pdt01.qmd | 22 +++----- book/tables/disposition/pdt02.qmd | 14 ++--- book/tables/efficacy/aovt01.qmd | 22 +++----- book/tables/efficacy/aovt02.qmd | 22 +++----- book/tables/efficacy/aovt03.qmd | 14 ++--- book/tables/efficacy/cfbt01.qmd | 22 +++----- book/tables/efficacy/cmht01.qmd | 27 ++++----- book/tables/efficacy/coxt01.qmd | 31 ++++------ book/tables/efficacy/coxt02.qmd | 23 +++----- book/tables/efficacy/dort01.qmd | 31 ++++------ book/tables/efficacy/lgrt02.qmd | 31 ++++------ book/tables/efficacy/mmrmt01.qmd | 20 +++---- book/tables/efficacy/onct05.qmd | 33 +++++------ book/tables/efficacy/ratet01.qmd | 13 ++--- book/tables/efficacy/rspt01.qmd | 36 +++++------- book/tables/efficacy/ttet01.qmd | 37 +++++------- book/tables/exposure/ext01.qmd | 26 +++------ book/tables/lab-results/lbt01.qmd | 23 +++----- book/tables/lab-results/lbt02.qmd | 22 +++----- book/tables/lab-results/lbt03.qmd | 25 +++------ book/tables/lab-results/lbt04.qmd | 21 +++---- book/tables/lab-results/lbt05.qmd | 20 +++---- book/tables/lab-results/lbt06.qmd | 17 ++---- book/tables/lab-results/lbt07.qmd | 21 +++---- book/tables/lab-results/lbt08.qmd | 14 ++--- book/tables/lab-results/lbt09.qmd | 15 ++--- book/tables/lab-results/lbt10.qmd | 17 ++---- book/tables/lab-results/lbt10_bl.qmd | 17 ++---- book/tables/lab-results/lbt11.qmd | 27 ++++----- book/tables/lab-results/lbt11_bl.qmd | 27 ++++----- book/tables/lab-results/lbt12.qmd | 12 ++-- book/tables/lab-results/lbt12_bl.qmd | 12 ++-- book/tables/lab-results/lbt13.qmd | 34 ++++------- book/tables/lab-results/lbt14.qmd | 34 ++++------- book/tables/lab-results/lbt15.qmd | 25 +++------ book/tables/medical-history/mht01.qmd | 29 ++++------ book/tables/pharmacokinetic/pkct01.qmd | 20 +++---- book/tables/pharmacokinetic/pkpt02.qmd | 16 +++--- book/tables/pharmacokinetic/pkpt03.qmd | 21 +++---- book/tables/pharmacokinetic/pkpt04.qmd | 17 +++--- book/tables/pharmacokinetic/pkpt05.qmd | 17 +++--- book/tables/pharmacokinetic/pkpt06.qmd | 17 +++--- book/tables/pharmacokinetic/pkpt07.qmd | 17 +++--- book/tables/pharmacokinetic/pkpt08.qmd | 13 ++--- book/tables/pharmacokinetic/pkpt11.qmd | 13 ++--- book/tables/risk-management-plan/rmpt01.qmd | 23 +++----- book/tables/risk-management-plan/rmpt03.qmd | 26 ++++----- book/tables/risk-management-plan/rmpt04.qmd | 23 +++----- book/tables/risk-management-plan/rmpt05.qmd | 21 +++---- book/tables/risk-management-plan/rmpt06.qmd | 23 +++----- book/tables/safety/enrollment01.qmd | 27 ++++----- book/tables/vital-signs/vst01.qmd | 22 +++----- book/tables/vital-signs/vst02.qmd | 24 +++----- package/DESCRIPTION | 3 +- package/staged_dependencies.yaml | 7 +-- 138 files changed, 1100 insertions(+), 1864 deletions(-) diff --git a/book/_quarto.yml b/book/_quarto.yml index 1bb7bd4fee..84a893b240 100644 --- a/book/_quarto.yml +++ b/book/_quarto.yml @@ -43,7 +43,7 @@ execute: engine: knitr webr: channel-type: "post-message" - packages: ["tern", "scda", "scda.2022", "dplyr"] + packages: ["tern", "random.cdisc.data", "dplyr"] show-startup-message: false autoload-packages: false @@ -118,4 +118,4 @@ website: profile: group: - [stable, development] - default: stable \ No newline at end of file + default: stable diff --git a/book/graphs/efficacy/fstg01.qmd b/book/graphs/efficacy/fstg01.qmd index 02ef1d0e99..8b0333edb5 100644 --- a/book/graphs/efficacy/fstg01.qmd +++ b/book/graphs/efficacy/fstg01.qmd @@ -7,22 +7,20 @@ subtitle: Subgroup Analysis of Best Overall Response {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) library(nestcolor) -adsl_f <- synthetic_cdisc_dataset("latest", "adsl") %>% +adsl_f <- random.cdisc.data::cadsl %>% select(STUDYID, USUBJID, ARMCD, ARM, SEX, BMRKR2, STRATA1, STRATA2) -adrs_f <- synthetic_cdisc_dataset("latest", "adrs") %>% +adrs_f <- random.cdisc.data::cadrs %>% filter(PARAMCD == "INVET") %>% select(STUDYID, USUBJID, PARAMCD, AVISIT, AVALC) @@ -49,7 +47,9 @@ var_labels(anl_rsp_arms_ab) <- c(anl_labels, is_rsp = "Is Responder") ## {{< fa regular file-lines sm fw >}} Preview + + ```{r plot1, test = list(plot_v1 = "plot"), fig.width = 20, fig.height = 5, opts.label = ifelse(packageVersion("survival") < "3.5-8" || packageVersion("tern") < "0.9.3.9018", "skip_test_strict", "")} df <- extract_rsp_subgroups( variables = list( @@ -69,8 +69,7 @@ plot <- g_forest(tbl = result) plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Specifying Class Variables and
Options for the Treatment Variable @@ -79,7 +78,9 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + + ```{r plot2, test = list(plot_v2 = "plot"), fig.width = 20, fig.height = 5, opts.label = ifelse(packageVersion("survival") < "3.5-8" || packageVersion("tern") < "0.9.3.9018", "skip_test_strict", "")} anl_rsp_comb_arms_ac <- anl %>% mutate(is_rsp = AVALC %in% c("CR", "PR")) %>% @@ -117,8 +118,7 @@ plot <- g_forest(tbl = result) plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Selecting Columns and
Changing the Alpha Level @@ -127,7 +127,9 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + + ```{r plot3, test = list(plot_v3 = "plot"), fig.width = 10, fig.height = 4, opts.label = ifelse(packageVersion("survival") < "3.5-8" || packageVersion("tern") < "0.9.3.9018", "skip_test_strict", "")} df <- extract_rsp_subgroups( variables = list( @@ -147,8 +149,7 @@ plot <- g_forest(tbl = result) plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with Fixed
Symbol Size @@ -157,7 +158,9 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + + ```{r plot4, test = list(plot_v4 = "plot"), fig.width = 20, fig.height = 5, opts.label = ifelse(packageVersion("survival") < "3.5-8" || packageVersion("tern") < "0.9.3.9018", "skip_test_strict", "")} df <- extract_rsp_subgroups( variables = list( @@ -180,8 +183,7 @@ plot <- g_forest( plot ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of CR Only, Setting
Values Indicating Response @@ -190,7 +192,9 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + + ```{r plot5, test = list(plot_v5 = "plot"), fig.width = 20, fig.height = 5, opts.label = ifelse(packageVersion("survival") < "3.5-8" || packageVersion("tern") < "0.9.3.9018", "skip_test_strict", "")} anl_cr_arms_ab <- anl %>% mutate(is_rsp = AVALC == "CR") %>% @@ -227,8 +231,7 @@ width <- 20 height <- 5 ``` -`r webr_code_labels <- c("setup", "plot5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot5")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -244,11 +247,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADRS <- synthetic_cdisc_dataset("latest", "adrs") + ADSL <- random.cdisc.data::cadsl + ADRS <- random.cdisc.data::cadrs }) datanames <- c("ADSL", "ADRS") datanames(data) <- datanames @@ -306,5 +307,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/efficacy/fstg02.qmd b/book/graphs/efficacy/fstg02.qmd index f7042212f2..cd5d6fe635 100644 --- a/book/graphs/efficacy/fstg02.qmd +++ b/book/graphs/efficacy/fstg02.qmd @@ -7,7 +7,7 @@ subtitle: Subgroup Analysis of Survival Duration {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -17,8 +17,6 @@ library(tern) library(dplyr) library(forcats) library(nestcolor) -library(scda) -library(scda.2022) preprocess_adtte <- function(adtte) { # Save variable labels before data processing steps. @@ -51,7 +49,7 @@ preprocess_adtte <- function(adtte) { adtte } -anl <- synthetic_cdisc_dataset("latest", "adtte") %>% +anl <- random.cdisc.data::cadtte %>% preprocess_adtte() ``` @@ -61,6 +59,7 @@ anl <- synthetic_cdisc_dataset("latest", "adtte") %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), fig.width = 15, fig.height = 4, opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} anl1 <- anl @@ -82,8 +81,7 @@ plot <- g_forest(tbl = result) plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Specifying Class Variables and
Options for the Treatment Variable @@ -92,6 +90,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, test = list(plot_v2 = "plot"), fig.width = 15, fig.height = 4, opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} anl2 <- anl %>% mutate( @@ -124,8 +123,7 @@ plot <- g_forest(tbl = result) plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Selecting Columns and
Changing the Alpha Level @@ -134,6 +132,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot3, test = list(plot_v3 = "plot"), fig.width = 8, fig.height = 4, opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} anl3 <- anl @@ -155,8 +154,7 @@ plot <- g_forest(tbl = result) plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with Fixed
Symbol Size @@ -165,6 +163,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot4, test = list(plot_v4 = "plot"), fig.width = 15, fig.height = 4, opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} anl4 <- anl @@ -195,8 +194,7 @@ height <- 4 plot_v3.width <- 8 # nolint: object_name. ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -212,19 +210,17 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) library(forcats) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") + ADSL <- random.cdisc.data::cadsl ADSL <- ADSL %>% filter(ARM %in% c("B: Placebo", "A: Drug X")) %>% mutate(ARM = droplevels(fct_relevel(ARM, "B: Placebo"))) %>% mutate(ARMCD = droplevels(fct_relevel(ARMCD, "ARM B"))) ADSL$RACE <- droplevels(ADSL$RACE) - ADTTE <- synthetic_cdisc_dataset("latest", "adtte") + ADTTE <- random.cdisc.data::cadtte adtte_labels <- col_labels(ADTTE) ADTTE <- ADTTE %>% @@ -282,5 +278,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/efficacy/kmg01.qmd b/book/graphs/efficacy/kmg01.qmd index b978e8ab1f..795424d641 100644 --- a/book/graphs/efficacy/kmg01.qmd +++ b/book/graphs/efficacy/kmg01.qmd @@ -7,19 +7,17 @@ subtitle: Kaplan-Meier Plot {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(nestcolor) -adtte <- synthetic_cdisc_dataset("latest", "adtte") +adtte <- random.cdisc.data::cadtte anl <- adtte %>% dplyr::filter(PARAMCD == "OS") %>% dplyr::mutate(is_event = CNSR == 0) @@ -32,6 +30,7 @@ variables <- list(tte = "AVAL", is_event = "is_event", arm = "ARMCD") ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, fig.width = 9, fig.height = 6, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} plot <- g_km( df = anl, @@ -43,8 +42,7 @@ plot <- g_km( plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Failures @@ -53,6 +51,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, fig.width = 9, fig.height = 6, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} plot <- g_km( df = anl, @@ -66,8 +65,7 @@ plot <- g_km( plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Without
Comparative Statistics @@ -76,6 +74,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot3, fig.width = 9, fig.height = 6, test = list(plot_v3 = "plot"), opts.label = "skip_test_strict"} plot <- g_km( df = anl, @@ -86,8 +85,7 @@ plot <- g_km( plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Without
Censoring Marks @@ -96,6 +94,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot4, fig.width = 9, fig.height = 6, test = list(plot_v4 = "plot"), opts.label = "skip_test_strict"} plot <- g_km( df = anl, @@ -108,8 +107,7 @@ plot <- g_km( plot ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Modifying
Censoring Marks @@ -118,6 +116,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot5, fig.width = 9, fig.height = 6, test = list(plot_v5 = "plot"), opts.label = "skip_test_strict"} plot <- g_km( df = anl, @@ -131,8 +130,7 @@ plot <- g_km( plot ``` -`r webr_code_labels <- c("setup", "plot5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot5")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Modifying Options for Statistics,
Tie Handling, Stratification, etc. @@ -141,6 +139,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot6, fig.width = 9, fig.height = 6, test = list(plot_v6 = "plot"), opts.label = "skip_test_strict"} variables$strata <- c("STRATA1", "STRATA2") plot <- g_km( @@ -159,8 +158,7 @@ plot <- g_km( plot ``` -`r webr_code_labels <- c("setup", "plot6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot6")` {{< include ../../_utils/webr.qmd >}} ::: ::: {.content-visible when-profile="development"} @@ -183,11 +181,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADTTE <- synthetic_cdisc_dataset("latest", "adtte") + ADSL <- random.cdisc.data::cadsl + ADTTE <- random.cdisc.data::cadtte }) datanames <- c("ADSL", "ADTTE") datanames(data) <- datanames @@ -244,5 +240,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/efficacy/mmrmg01.qmd b/book/graphs/efficacy/mmrmg01.qmd index 7a5884d1f0..22eb377bb4 100644 --- a/book/graphs/efficacy/mmrmg01.qmd +++ b/book/graphs/efficacy/mmrmg01.qmd @@ -10,7 +10,7 @@ subtitle: Plots for Mixed-Effect Model Repeated Measures Analysis Given an MMRM fitted with `s_mmrm`, `g_mmrm_lsmeans` displays for each visit the adjusted means within group and/or difference in adjusted means between groups. `g_mmrm_diagnostic` displays marginal residual plots for evaluating model fit. -:::: {.panel-tabset} +::: panel-tabset ## Data Setup and
Model Fitting ```{r setup, message = FALSE} @@ -18,12 +18,10 @@ Given an MMRM fitted with `s_mmrm`, `g_mmrm_lsmeans` displays for each visit the library(dplyr) library(tern.mmrm) -library(scda) -library(scda.2022) library(nestcolor) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs adqs_f <- adqs %>% dplyr::filter(PARAMCD == "FKSI-FWB" & !AVISIT %in% c("BASELINE")) %>% @@ -48,6 +46,7 @@ mmrm_results <- fit_mmrm( ### Considering the treatment variable in the model + ```{r plot1, dev.args = list(pointsize = 6), test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} plot <- g_mmrm_lsmeans( mmrm_results, @@ -60,6 +59,7 @@ plot ### Considering the treatment variable in the model, with lines + ```{r plot2, dev.args = list(pointsize = 6), test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} plot <- g_mmrm_lsmeans( mmrm_results, @@ -73,6 +73,7 @@ plot ### Considering the treatment variable in the model, with statistics table + ```{r plot3, dev.args = list(pointsize = 6), fig.height = 7, test = list(plot_v3 = "plot"), opts.label = "skip_test_strict"} plot <- g_mmrm_lsmeans( mmrm_results, @@ -90,6 +91,7 @@ plot Users can choose to display both estimates and contrasts together by running `g_mmrm_lsmeans(mmrm_results)`. + ```{r plot4, dev.args = list(pointsize = 6), test = list(plot_v4 = "plot"), opts.label = "skip_test_strict"} plot <- g_mmrm_lsmeans( mmrm_results, @@ -124,12 +126,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADQS <- synthetic_cdisc_dataset("latest", "adqs") %>% + ADSL <- random.cdisc.data::cadsl + ADQS <- random.cdisc.data::cadqs %>% filter(ABLFL != "Y" & ABLFL2 != "Y") %>% filter(AVISIT %in% c("WEEK 1 DAY 8", "WEEK 2 DAY 15", "WEEK 3 DAY 22")) %>% mutate( @@ -180,5 +180,4 @@ shinyApp(app$ui, app$server) ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/efficacy/mmrmg02.qmd b/book/graphs/efficacy/mmrmg02.qmd index d2d52917fb..9aa4f00ff4 100644 --- a/book/graphs/efficacy/mmrmg02.qmd +++ b/book/graphs/efficacy/mmrmg02.qmd @@ -7,20 +7,18 @@ subtitle: Forest Plot for Mixed-Effect Model Repeated Measures {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern.mmrm) library(nestcolor) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs adqs_f <- adqs %>% dplyr::filter(PARAMCD == "FKSI-FWB" & !AVISIT %in% c("BASELINE")) %>% @@ -139,5 +137,4 @@ height <- 4 {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/other/brg01.qmd b/book/graphs/other/brg01.qmd index b403549599..6b5edc4326 100644 --- a/book/graphs/other/brg01.qmd +++ b/book/graphs/other/brg01.qmd @@ -7,7 +7,7 @@ subtitle: Bar Chart {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -16,13 +16,11 @@ subtitle: Bar Chart library(binom) library(dplyr) library(ggplot2) -library(scda) -library(scda.2022) library(tidyr) library(tern) library(nestcolor) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl # filtered population patpop_df <- adsl %>% @@ -31,12 +29,12 @@ patpop_df <- adsl %>% patpop <- setNames(patpop_df$patpop, patpop_df$STUDYID) denom <- patpop_df$patpop -adae <- synthetic_cdisc_dataset("latest", "adae") %>% +adae <- random.cdisc.data::cadae %>% mutate(AETOXGRC = as.character(AETOXGR)) attributes(adae$AETOXGRC)$label <- "Analysis Toxicity Grade (C)" vl_ae <- var_labels(adae) -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adlb <- random.cdisc.data::cadlb vl_lb <- var_labels(adlb) ``` @@ -60,8 +58,7 @@ plot <- ggplot(anl, aes(x = .data[["ACTARM"]])) + plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Percentage @@ -91,8 +88,7 @@ plot <- ggplot(anl, aes(x = .data[["ACTARM"]])) + plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Frequency with
Total Number of Subjects @@ -119,8 +115,7 @@ plot <- ggplot(anl, aes(x = .data[["xvarlabel"]])) + plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Frequency
with Horizontal Bars @@ -143,8 +138,7 @@ plot <- ggplot(anl, aes(x = .data[["ACTARM"]])) + plot ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Percentage
and Confidence Intervals @@ -195,8 +189,7 @@ plot <- ggplot(anl) + plot ``` -`r webr_code_labels <- c("setup", "plot5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot5")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Percentage by
Treatment and Covariate @@ -205,6 +198,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot6, test = list(plot_v6 = "plot"), opts.label = "skip_test_strict"} anl <- adae %>% filter(AESER == "Y") @@ -228,8 +222,7 @@ plot <- ggplot(anl, aes(x = .data[["ACTARM"]], fill = .data[["SEX"]])) + plot ``` -`r webr_code_labels <- c("setup", "plot6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot6")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Percentage by
Covariate and Treatment @@ -238,6 +231,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot7, test = list(plot_v7 = "plot"), opts.label = "skip_test_strict"} anl <- adae %>% filter(AESER == "Y") @@ -260,8 +254,7 @@ plot <- ggplot(anl, aes(x = .data[["SEX"]], fill = .data[["ACTARM"]])) + plot ``` -`r webr_code_labels <- c("setup", "plot7")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot7")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Percentage
with Mean and Median @@ -330,8 +323,7 @@ plot <- cowplot::plot_grid(graph, tbl, plot ``` -`r webr_code_labels <- c("setup", "plot8")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot8")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Categorical
Variable @@ -340,6 +332,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot9, test = list(plot_v9 = "plot"), opts.label = "skip_test_strict"} anl <- adae @@ -367,8 +360,7 @@ plot <- ggplot(anl, aes(x = .data[["ACTARM"]], fill = .data[["AETOXGRC"]])) + plot ``` -`r webr_code_labels <- c("setup", "plot9")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot9")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -382,5 +374,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/other/bwg01.qmd b/book/graphs/other/bwg01.qmd index 610b2bbac4..45e96c42cd 100644 --- a/book/graphs/other/bwg01.qmd +++ b/book/graphs/other/bwg01.qmd @@ -7,20 +7,18 @@ subtitle: Box Plot {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show # generic code for all plots -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adlb <- random.cdisc.data::cadlb adlb <- adlb %>% filter(PARAMCD == "ALT" & AVISIT == "WEEK 2 DAY 15") # Definition of boxplot boundaries and whiskers @@ -107,8 +105,7 @@ plot <- bp_annos(bp_1, oc) plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Changing
Whiskers @@ -136,8 +133,7 @@ plot <- bp_annos(bp_3, oc) plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Adding
Outliers @@ -166,8 +162,7 @@ plot <- bp_annos(bp_4, oc) plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Specifying Marker
for Outliers and
Adding Patient ID @@ -207,8 +202,7 @@ plot <- bp_annos(bp_5, oc) plot ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot Specifying
Marker for Mean @@ -233,8 +227,7 @@ plot <- bp_annos(bp_6, oc) plot ``` -`r webr_code_labels <- c("setup", "plot5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot5")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot by Treatment
and Timepoint @@ -243,9 +236,10 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot6, test = list(plot_v6 = "plot"), opts.label = "skip_test_strict"} -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb adlb_v <- adlb %>% filter(PARAMCD == "ALT" & AVISIT %in% c("WEEK 1 DAY 8", "WEEK 2 DAY 15", "WEEK 3 DAY 22", "WEEK 4 DAY 29")) @@ -277,8 +271,7 @@ plot <- bp_annos(bp_7, oc, 2) plot ``` -`r webr_code_labels <- c("setup", "plot6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot6")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot by Timepoint
and Treatment @@ -287,6 +280,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot7, test = list(plot_v7 = "plot"), opts.label = "skip_test_strict"} bp_8 <- ggplot(adlb_v, aes(x = ARMCD, y = AVAL)) + stat_summary( @@ -315,8 +309,7 @@ plot <- bp_annos(bp_8, oc, 2) plot ``` -`r webr_code_labels <- c("setup", "plot7")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot7")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with
Table Section @@ -389,8 +382,7 @@ plot <- cowplot::plot_grid(bp_annos(bp_9, oc), tbl_1, plot ``` -`r webr_code_labels <- c("setup", "plot8")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot8")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with Number of Patients
only in Table Section @@ -416,8 +408,7 @@ plot <- cowplot::plot_grid(bp_annos(bp_9, oc), tbl_2, plot ``` -`r webr_code_labels <- c("setup", "plot8", "plot9")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot8", "plot9")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -433,12 +424,10 @@ library(teal.modules.general) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(tern) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb # If PARAMCD and AVISIT are not factors, convert to factors # Also fill in missing values with "" @@ -531,5 +520,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/other/cig01.qmd b/book/graphs/other/cig01.qmd index 0f1f34df26..e744853e44 100644 --- a/book/graphs/other/cig01.qmd +++ b/book/graphs/other/cig01.qmd @@ -7,7 +7,7 @@ subtitle: Confidence Interval Plot {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -16,11 +16,9 @@ subtitle: Confidence Interval Plot library(tern) library(ggplot2) library(dplyr) -library(scda) -library(scda.2022) library(nestcolor) -adlb <- synthetic_cdisc_dataset("latest", "adlb") %>% +adlb <- random.cdisc.data::cadlb %>% filter(PARAMCD == "ALT", AVISIT == "BASELINE") ``` @@ -32,6 +30,7 @@ adlb <- synthetic_cdisc_dataset("latest", "adlb") %>% The function `stat_mean_ci` from the `tern` package can be used with default values to draw the 95% confidence interval around the mean. + ```{r plot1and2, test = list(plot_v1_and_v2 = "plot"), opts.label = "skip_test_strict"} plot <- ggplot( data = adlb, @@ -60,8 +59,7 @@ plot <- ggplot( plot ``` -`r webr_code_labels <- c("setup", "plot1and2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1and2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Confidence Interval Using
a Different Stratification Variable @@ -70,6 +68,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot3, test = list(plot_v3 = "plot"), opts.label = "skip_test_strict"} plot <- ggplot( data = adlb, @@ -98,8 +97,7 @@ plot <- ggplot( plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Median and
95% CIs for Median @@ -110,6 +108,7 @@ plot The function `stat_median_ci` from the `tern` package works similarly to `stat_mean_ci`. + ```{r plot4, test = list(plot_v4 = "plot"), opts.label = "skip_test_strict"} plot <- ggplot( data = adlb, @@ -138,8 +137,7 @@ plot <- ggplot( plot ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Median and 95% CIs for
Median Using Different Alpha Level @@ -150,6 +148,7 @@ plot To modify the confidence level for the estimation of the confidence interval, the call to `stat_mean_ci` (or `stat_median_ci`) can be slightly modified. + ```{r plot5, test = list(plot_v5 = "plot"), opts.label = "skip_test_strict"} plot <- ggplot( data = adlb, @@ -178,8 +177,7 @@ plot <- ggplot( plot ``` -`r webr_code_labels <- c("setup", "plot5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot5")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of Mean
and Median @@ -197,8 +195,7 @@ table <- build_table(lyt = lyt, df = adlb) table ``` -`r webr_code_labels <- c("setup", "table6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "table6")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -214,11 +211,8 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb }) datanames <- c("ADSL", "ADLB") datanames(data) <- datanames @@ -293,5 +287,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/other/ippg01.qmd b/book/graphs/other/ippg01.qmd index 8881478c4d..f3ecfbc31d 100644 --- a/book/graphs/other/ippg01.qmd +++ b/book/graphs/other/ippg01.qmd @@ -9,22 +9,20 @@ subtitle: Individual Patient Plot Over Time For illustration purposes, we will subset the `adlb` dataset for safety population in treatment arm A and a specific lab parameter (`ALT`). -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) # use small sample size -adsl <- synthetic_cdisc_dataset("latest", "adsl") %>% slice(1:15) -adlb <- synthetic_cdisc_dataset("latest", "adlb") %>% filter(USUBJID %in% adsl$USUBJID) +adsl <- random.cdisc.data::cadsl %>% slice(1:15) +adlb <- random.cdisc.data::cadlb %>% filter(USUBJID %in% adsl$USUBJID) # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adlb <- df_explicit_na(adlb) @@ -48,6 +46,7 @@ The user can select different `plotting_choices` depending on their preference. To demonstrate, separate plots are produced with a maximum of 3 observations each. + ```{r plots1, test = list(plots_v1 = "plots"), opts.label = "skip_test_strict"} plots <- g_ipp( df = adlb_f, @@ -64,8 +63,7 @@ plots <- g_ipp( plots ``` -`r webr_code_labels <- c("setup", "plots1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plots1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with Patient Baselines as Reference @@ -77,6 +75,7 @@ Here, patients' individual baseline values will be shown for reference. Note that users can provide their own custom theme to the function via the `ggtheme` argument. + ```{r plots2, test = list(plots_v2 = "plots"), opts.label = "skip_test_strict"} plots <- g_ipp( df = adlb_f, @@ -96,8 +95,7 @@ plots <- g_ipp( plots ``` -`r webr_code_labels <- c("setup", "plots2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plots2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -113,13 +111,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) # use small sample size - ADSL <- synthetic_cdisc_dataset("latest", "adsl") %>% slice(1:15) - ADLB <- synthetic_cdisc_dataset("latest", "adlb") %>% filter(USUBJID %in% ADSL$USUBJID) + ADSL <- random.cdisc.data::cadsl %>% slice(1:15) + ADLB <- random.cdisc.data::cadlb %>% filter(USUBJID %in% ADSL$USUBJID) # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -184,5 +180,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/other/ltg01.qmd b/book/graphs/other/ltg01.qmd index 81e191870a..0e7b89a08b 100644 --- a/book/graphs/other/ltg01.qmd +++ b/book/graphs/other/ltg01.qmd @@ -9,14 +9,12 @@ subtitle: Lattice Plot of Laboratory Tests by Treatment Group Over Time Lattice plots are natively handled by R, the examples below rely mostly on the package `ggplot2`. -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(teal.modules.clinical) library(ggplot2) @@ -24,8 +22,8 @@ library(dplyr) library(nestcolor) # Datasets -adsl <- synthetic_cdisc_dataset("latest", "adsl") %>% slice(1:8) -adlb <- synthetic_cdisc_dataset("latest", "adlb") %>% filter(USUBJID %in% adsl$USUBJID) +adsl <- random.cdisc.data::cadsl %>% slice(1:8) +adlb <- random.cdisc.data::cadlb %>% filter(USUBJID %in% adsl$USUBJID) # Pre-processing adlb$AVISIT_txt <- adlb$AVISIT @@ -56,6 +54,7 @@ pch <- c( ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} # General mapping and "lattice" ("facet" in ggplot2 nomenclature). g1 <- { @@ -74,8 +73,7 @@ plot <- g1 plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: #### Modifying Facets @@ -86,6 +84,7 @@ plot The units describing rows of panes and the number of patients under each arm is specified by modifying `facet_grid()`: + ```{r plot2, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} # Include the units and the sample size N. g2 <- g1 + facet_grid( @@ -97,8 +96,7 @@ plot <- g2 plot ``` -`r webr_code_labels <- c("setup", "plot1", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: #### Modifying X-Axis @@ -110,6 +108,7 @@ The graphic elements are modified through usual `ggplot2` functions. For instance, the x-axis could be improved as follows: + ```{r plot3, test = list(plot_v3 = "g3"), opts.label = "skip_test_strict"} g3 <- g2 + theme( axis.text.x = element_text(angle = 45, hjust = 1), @@ -120,8 +119,7 @@ plot <- g3 plot ``` -`r webr_code_labels <- c("setup", "plot1", "plot2", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1", "plot2", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Liver Function Tests
Including Mean, Median, and 95% CIs @@ -135,8 +133,8 @@ The example below suggests a larger dataset, where the individual subject legend #| code-fold: show # Datasets -adsl <- synthetic_cdisc_dataset("latest", "adsl") %>% slice(1:40) -adlb <- synthetic_cdisc_dataset("latest", "adlb") %>% filter(USUBJID %in% adsl$USUBJID) +adsl <- random.cdisc.data::cadsl %>% slice(1:40) +adlb <- random.cdisc.data::cadlb %>% filter(USUBJID %in% adsl$USUBJID) # Pre-processing adlb$AVISIT_txt <- adlb$AVISIT @@ -191,8 +189,7 @@ plot <- g4 plot ``` -`r webr_code_labels <- c("setup", "pre-processing", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: #### Adding Mean @@ -201,6 +198,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot51, test = list(plot_v51 = "plot"), opts.label = "skip_test_strict"} # Add the mean along with the 95% CI at every visit. g51 <- g4 + stat_summary( @@ -215,8 +213,7 @@ plot <- g51 + guides(linetype = guide_legend(title = NULL)) plot ``` -`r webr_code_labels <- c("setup", "pre-processing", "plot4", "plot51")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "plot4", "plot51")` {{< include ../../_utils/webr.qmd >}} ::: #### Adding Median @@ -225,6 +222,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot52, test = list(plot_v52 = "plot"), opts.label = "skip_test_strict"} # Instead of a mean, the median could be more relevant. g52 <- g51 + stat_summary( @@ -239,8 +237,7 @@ plot <- g52 + guides(linetype = guide_legend(title = "Aggregate")) plot ``` -`r webr_code_labels <- c("setup", "pre-processing", "plot4", "plot51", "plot52")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "plot4", "plot51", "plot52")` {{< include ../../_utils/webr.qmd >}} ::: #### Changing Confidence Level @@ -249,6 +246,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot53, test = list(plot_v53 = "plot"), opts.label = "skip_test_strict"} # Change the confidence level of interval for the median. # Note: check `?stat_mean_ci()` and `?stat_median_ci()` for further fine tuning. @@ -264,8 +262,7 @@ plot <- g53 + guides(linetype = guide_legend(title = NULL)) plot ``` -`r webr_code_labels <- c("setup", "pre-processing", "plot4", "plot53")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "plot4", "plot53")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -279,5 +276,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/other/mng01.qmd b/book/graphs/other/mng01.qmd index 23b2bef627..033bb573de 100644 --- a/book/graphs/other/mng01.qmd +++ b/book/graphs/other/mng01.qmd @@ -7,7 +7,7 @@ subtitle: Mean Plot {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,13 +15,11 @@ subtitle: Mean Plot library(dplyr) library(tern) -library(scda) -library(scda.2022) library(nestcolor) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") -advs <- synthetic_cdisc_dataset("latest", "advs") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb +advs <- random.cdisc.data::cadvs adsl_f <- adsl %>% filter(SAFFL == "Y") %>% @@ -57,6 +55,7 @@ advs_f <- advs %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} plot <- g_lineplot( df = adlb_f, @@ -66,8 +65,7 @@ plot <- g_lineplot( plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Mean and CIs of Change
from Baseline (Changing the Input
Analysis Data Set and Analysis Variable) @@ -76,6 +74,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} plot <- g_lineplot( df = advs_f, @@ -87,8 +86,7 @@ plot <- g_lineplot( plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Mean (+/-SD)
(Changing the Statistics) @@ -97,6 +95,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot3, test = list(plot_v3 = "plot"), opts.label = "skip_test_strict"} plot <- g_lineplot( df = adlb_f, @@ -109,8 +108,7 @@ plot <- g_lineplot( plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Mean and CI
(Modify Alpha Level) @@ -119,6 +117,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot4, test = list(plot_v4 = "plot"), opts.label = "skip_test_strict"} plot <- g_lineplot( df = adlb_f, @@ -130,8 +129,7 @@ plot <- g_lineplot( plot ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Mean and CI (with Number
of Patients only in Table Section) @@ -140,6 +138,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot5, test = list(plot_v5 = "plot"), opts.label = "skip_test_strict"} plot <- g_lineplot( df = adlb_f, @@ -150,8 +149,7 @@ plot <- g_lineplot( plot ``` -`r webr_code_labels <- c("setup", "plot5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot5")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Mean and CI
(with Table Section) @@ -160,6 +158,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot6, fig.height = 8, test = list(plot_v6 = "plot"), opts.label = "skip_test_strict"} plot <- g_lineplot( df = adlb_f, @@ -170,8 +169,7 @@ plot <- g_lineplot( plot ``` -`r webr_code_labels <- c("setup", "plot6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot6")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot of Median and CI (Visits
Condensed in Table Section) @@ -184,6 +182,7 @@ This option is not supported. ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot7, test = list(plot_v7 = "plot"), opts.label = "skip_test_strict"} plot <- g_lineplot( df = adlb_f, @@ -194,8 +193,7 @@ plot <- g_lineplot( plot ``` -`r webr_code_labels <- c("setup", "plot7")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot7")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -211,13 +209,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) library(forcats) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") %>% + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb %>% mutate(AVISIT = fct_reorder(AVISIT, AVISITN, min)) }) datanames <- c("ADSL", "ADLB") @@ -258,5 +254,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkcg01.qmd b/book/graphs/pharmacokinetic/pkcg01.qmd index 15b1842d62..08b28fe15a 100644 --- a/book/graphs/pharmacokinetic/pkcg01.qmd +++ b/book/graphs/pharmacokinetic/pkcg01.qmd @@ -7,20 +7,18 @@ subtitle: Plot of PK Concentration Over Time by Subject {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) -adpc <- synthetic_cdisc_dataset("latest", "adpc") +adpc <- random.cdisc.data::cadpc ``` ## Plot in Linear Scale @@ -29,6 +27,7 @@ adpc <- synthetic_cdisc_dataset("latest", "adpc") ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} adpc_a <- adpc %>% filter( @@ -59,8 +58,7 @@ plot <- result[[1]] # only show the first subject plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot in Log Scale @@ -69,6 +67,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} adpc_a <- adpc %>% filter( @@ -100,8 +99,7 @@ plot <- result[[1]] + ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10) plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -115,5 +113,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkcg02.qmd b/book/graphs/pharmacokinetic/pkcg02.qmd index e9ffa4b2f9..21076d5a3c 100644 --- a/book/graphs/pharmacokinetic/pkcg02.qmd +++ b/book/graphs/pharmacokinetic/pkcg02.qmd @@ -7,20 +7,18 @@ subtitle: Plot of PK Concentration Over Time by Cohort/Treatment Group/Dose {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) -adpc <- synthetic_cdisc_dataset("latest", "adpc") +adpc <- random.cdisc.data::cadpc ``` ## Plot in Linear Scale @@ -29,6 +27,7 @@ adpc <- synthetic_cdisc_dataset("latest", "adpc") ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} adpc_a <- adpc %>% filter( @@ -59,8 +58,7 @@ plot <- g_ipp( plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot in Log Scale @@ -69,6 +67,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} adpc_a <- adpc %>% filter( @@ -101,8 +100,7 @@ plot <- result + ggplot2::scale_y_log10(breaks = c(0.001, 0.01, 0.1, 1, 10), lab plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -116,5 +114,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkcg03.qmd b/book/graphs/pharmacokinetic/pkcg03.qmd index 8768a79beb..7b9679f50a 100644 --- a/book/graphs/pharmacokinetic/pkcg03.qmd +++ b/book/graphs/pharmacokinetic/pkcg03.qmd @@ -7,24 +7,22 @@ subtitle: Plot of Mean PK Concentration Over Time by Cohort {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) -adsl_f <- synthetic_cdisc_dataset("latest", "adsl") %>% +adsl_f <- random.cdisc.data::cadsl %>% filter(SAFFL == "Y" & ARM != "B: Placebo") %>% df_explicit_na() -adpc <- synthetic_cdisc_dataset("latest", "adpc") %>% +adpc <- random.cdisc.data::cadpc %>% mutate(Patient_ID = sub(".*id-", "", USUBJID)) %>% filter(PARAM == "Plasma Drug X") %>% droplevels() %>% @@ -37,6 +35,7 @@ adpc <- synthetic_cdisc_dataset("latest", "adpc") %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} use_title <- "Plot of Mean (+/- SD) Plasma Concentrations Over Time by Treatment, \nPK Evaluable Patients" use_subtitle <- "Analyte:" @@ -68,8 +67,7 @@ plot <- result + theme(plot.caption = element_text(hjust = 0)) plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot in Log Scale @@ -78,6 +76,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, warning = FALSE, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} use_title <- "Plot of Mean (+/- SD) Log-Scale Plasma Concentrations Over Time by Treatment, \nPK Evaluable Patients" use_subtitle <- "Analyte:" @@ -113,8 +112,7 @@ plot <- result + theme(plot.caption = element_text(hjust = 0)) + plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -128,5 +126,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkpg01.qmd b/book/graphs/pharmacokinetic/pkpg01.qmd index 3a2447ea4b..152968dd96 100644 --- a/book/graphs/pharmacokinetic/pkpg01.qmd +++ b/book/graphs/pharmacokinetic/pkpg01.qmd @@ -7,22 +7,20 @@ subtitle: Plot of Mean Cumulative Percentage (%) of Recovered Drug in Urine {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) set.seed(123) # loading in the data -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp # filtering the rows for specific data entries adpp <- adpp %>% @@ -49,6 +47,7 @@ levels(adpp$ARM) <- c( ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} use_title <- "Plot of Mean (+/- SD) Cummulative Percentage (%) of Recovered Drug in Urine \nby Analyte, Visit: PK Evaluable Patients" # nolint: line_length. use_subtitle <- "Analyte: Plasma Drug X \nVisit: CYCLE 1 DAY 1 \nPK Parameter:" @@ -84,8 +83,7 @@ plot <- result + theme(plot.caption = element_text(hjust = 0)) + plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with Six Cohorts @@ -97,6 +95,7 @@ In this case we need to process the data further by artificially adding more ran Of course this step is not necessary in the case that data already has more cohorts. + ```{r plot2, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} adpp_hck <- adpp %>% mutate(AVAL + 1 * rnorm(nrow(adpp), mean = 1, sd = 1)) %>% @@ -148,8 +147,7 @@ plot <- result + theme(plot.caption = element_text(hjust = 0)) + plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -163,5 +161,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkpg02.qmd b/book/graphs/pharmacokinetic/pkpg02.qmd index 87c348bcf9..a507dd0362 100644 --- a/book/graphs/pharmacokinetic/pkpg02.qmd +++ b/book/graphs/pharmacokinetic/pkpg02.qmd @@ -7,22 +7,20 @@ subtitle: Pharmacokinetic Parameter Summary of Serum PK Parameters by Treatment {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) # need adex for dose info and adpp for AUC max info -adex <- synthetic_cdisc_dataset("latest", "adex") -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adex <- random.cdisc.data::cadex +adpp <- random.cdisc.data::cadpp adpp_a <- adpp %>% filter( @@ -56,6 +54,7 @@ y_var <- "AUCinf" ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} # calculate Summary Statistics (mean and sd) for each group SummaryStat <- adpp_adex %>% # nolint: object_name. @@ -116,8 +115,7 @@ plot <- ggplot(adpp_adex, aes(x = .data[[x_var]], y = .data[[y_var]])) + plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: ## Summary of Plasma Pharmacokinetic
Parameters with Median Points @@ -126,6 +124,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} # calculate median for each group if preferred SummaryStat <- adpp_adex %>% # nolint: object_name. @@ -164,8 +163,7 @@ plot <- ggplot(adpp_adex, aes(x = .data[[x_var]], y = .data[[y_var]])) + plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -179,5 +177,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkpg03.qmd b/book/graphs/pharmacokinetic/pkpg03.qmd index ecf90046fd..50d74232bc 100644 --- a/book/graphs/pharmacokinetic/pkpg03.qmd +++ b/book/graphs/pharmacokinetic/pkpg03.qmd @@ -7,20 +7,18 @@ subtitle: Box Plot of Pharmacokinetic Parameters by Visit -- Plasma {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(nestcolor) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp ``` ## Plot of CMAX by Visit @@ -29,6 +27,7 @@ adpp <- synthetic_cdisc_dataset("latest", "adpp") ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} # filtered parameter adpp <- adpp %>% filter(PARAMCD == "CMAX", PPSPEC == "Plasma") @@ -65,12 +64,10 @@ plot <- ggplot(adpp, aes(x = AVISIT, y = AVAL, fill = ACTARM)) + plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkpg04.qmd b/book/graphs/pharmacokinetic/pkpg04.qmd index 8477ee9d0f..78720a5dd6 100644 --- a/book/graphs/pharmacokinetic/pkpg04.qmd +++ b/book/graphs/pharmacokinetic/pkpg04.qmd @@ -7,21 +7,19 @@ subtitle: Box Plot of Pharmacokinetic Parameters by Visit -- Plasma {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(ggplot2) library(ggrepel) library(nestcolor) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp ``` ## Plot of CMAX by Visit @@ -30,6 +28,7 @@ adpp <- synthetic_cdisc_dataset("latest", "adpp") ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} # filtered parameter adpp <- adpp %>% filter(toupper(PARAMCD) == "CMAX" & toupper(PPSPEC) == "PLASMA") @@ -67,12 +66,10 @@ plot <- p + geom_point(aes(fill = ACTARM), size = 2, shape = 21, position = posi plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/graphs/pharmacokinetic/pkpg06.qmd b/book/graphs/pharmacokinetic/pkpg06.qmd index b747bd3f7d..3cb0920854 100644 --- a/book/graphs/pharmacokinetic/pkpg06.qmd +++ b/book/graphs/pharmacokinetic/pkpg06.qmd @@ -7,21 +7,19 @@ subtitle: Boxplot of Metabolite to Parent Ratios by Treatment {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(ggplot2) library(tidyr) library(tern) library(nestcolor) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp # Filter NAs adpp <- adpp %>% @@ -69,6 +67,7 @@ outliers <- function(x) { ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot1, test = list(plot_v1 = "plot"), opts.label = "skip_test_strict"} plot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) + geom_boxplot(outlier.size = 2) + @@ -109,8 +108,7 @@ plot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) + plot ``` -`r webr_code_labels <- c("setup", "plot1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot1")` {{< include ../../_utils/webr.qmd >}} ::: #### Drug Y Boxplot @@ -119,6 +117,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot2, test = list(plot_v2 = "plot"), opts.label = "skip_test_strict"} plot <- ggplot(anl_y, aes(x = PARAMCD, y = ratio, fill = ACTARM)) + geom_boxplot(outlier.size = 2) + @@ -159,8 +158,7 @@ plot <- ggplot(anl_y, aes(x = PARAMCD, y = ratio, fill = ACTARM)) + plot ``` -`r webr_code_labels <- c("setup", "plot2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot2")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with Whiskers at
Minimum and Maximum Values @@ -169,6 +167,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot3, test = list(plot_v3 = "plot"), opts.label = "skip_test_strict"} # whiskers are formed with the minimum and maximum values plot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) + @@ -195,8 +194,7 @@ plot <- ggplot(anl_x, aes(x = PARAMCD, y = ratio, fill = ACTARM)) + plot ``` -`r webr_code_labels <- c("setup", "plot3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot3")` {{< include ../../_utils/webr.qmd >}} ::: ## Plot with Whiskers at
5th and 95th Percentiles @@ -205,6 +203,7 @@ plot ## {{< fa regular file-lines sm fw >}} Preview + ```{r plot4, test = list(plot_v4 = "plot"), opts.label = "skip_test_strict"} anl_x_without_outliers <- anl_x %>% dplyr::group_by(PARAMCD, ACTARM) %>% @@ -264,8 +263,7 @@ plot <- ggplot(anl_x, aes(PARAMCD, ratio, fill = ACTARM, label = USUBJID)) + plot ``` -`r webr_code_labels <- c("setup", "plot4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "plot4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -279,5 +277,4 @@ plot ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/ADA/adal02.qmd b/book/listings/ADA/adal02.qmd index 8c3c740e08..c8a280e506 100644 --- a/book/listings/ADA/adal02.qmd +++ b/book/listings/ADA/adal02.qmd @@ -7,7 +7,7 @@ subtitle: Listing of Anti-Drug Antibody Data for Treatment Emergent ADA Positive {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,10 +15,8 @@ subtitle: Listing of Anti-Drug Antibody Data for Treatment Emergent ADA Positive library(dplyr) library(rlistings) -library(scda) -library(scda.2022) -adab <- synthetic_cdisc_dataset("latest", "adab") %>% +adab <- random.cdisc.data::cadab %>% filter(NFRLT %% 1 == 0 & NFRLT > 0) trt <- "A: Drug X" @@ -131,12 +129,10 @@ Asterisk denotes sample that tested positive for Neutralizing Antibodies." head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/ECG/egl01.qmd b/book/listings/ECG/egl01.qmd index 13dddd91a7..932cf2b0a2 100644 --- a/book/listings/ECG/egl01.qmd +++ b/book/listings/ECG/egl01.qmd @@ -7,18 +7,16 @@ subtitle: 'Listing of ECG Data: Safety-Evaluable Patients' {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adeg <- synthetic_cdisc_dataset("latest", "adeg") +adeg <- random.cdisc.data::cadeg get_param_unit_range <- function(dataset) { u_rng <- lapply(unique(dataset$PARAMCD), function(p) { @@ -98,12 +96,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/adverse-events/ael01.qmd b/book/listings/adverse-events/ael01.qmd index 3b407ed324..c423f0040f 100644 --- a/book/listings/adverse-events/ael01.qmd +++ b/book/listings/adverse-events/ael01.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Preferred Terms, Lowest Level Terms, and Investigator-Speci {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adae <- synthetic_cdisc_dataset("latest", "adae") +adae <- random.cdisc.data::cadae out <- adae %>% select(AESOC, AEDECOD, AELLT, AETERM) %>% @@ -48,12 +46,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/adverse-events/ael01_nollt.qmd b/book/listings/adverse-events/ael01_nollt.qmd index 2d69881016..f087f05c2e 100644 --- a/book/listings/adverse-events/ael01_nollt.qmd +++ b/book/listings/adverse-events/ael01_nollt.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Preferred Terms and Investigator-Specified Adverse Event Te {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adae <- synthetic_cdisc_dataset("latest", "adae") +adae <- random.cdisc.data::cadae out <- adae %>% select(AESOC, AEDECOD, AETERM) %>% @@ -47,12 +45,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/adverse-events/ael02.qmd b/book/listings/adverse-events/ael02.qmd index 166cb605cd..48f50947d7 100644 --- a/book/listings/adverse-events/ael02.qmd +++ b/book/listings/adverse-events/ael02.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Adverse Events {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adae <- synthetic_cdisc_dataset("latest", "adae") +adae <- random.cdisc.data::cadae out <- adae %>% mutate( @@ -90,12 +88,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/adverse-events/ael02_ed.qmd b/book/listings/adverse-events/ael02_ed.qmd index 623606a41e..d84f70788a 100644 --- a/book/listings/adverse-events/ael02_ed.qmd +++ b/book/listings/adverse-events/ael02_ed.qmd @@ -7,19 +7,17 @@ subtitle: Listing of Adverse Events (for Early Development Studies) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) library(lubridate) -adae <- synthetic_cdisc_dataset("latest", "adae") +adae <- random.cdisc.data::cadae adae_anl <- adae %>% filter(SAFFL == "Y") %>% @@ -108,12 +106,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/adverse-events/ael03.qmd b/book/listings/adverse-events/ael03.qmd index 6917f7655a..bf4598de12 100644 --- a/book/listings/adverse-events/ael03.qmd +++ b/book/listings/adverse-events/ael03.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Serious Adverse Events {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adae <- synthetic_cdisc_dataset("latest", "adae") +adae <- random.cdisc.data::cadae out <- adae %>% filter(AESER == "Y") %>% @@ -104,12 +102,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/adverse-events/ael04.qmd b/book/listings/adverse-events/ael04.qmd index 23c887c7d6..61c5497bad 100644 --- a/book/listings/adverse-events/ael04.qmd +++ b/book/listings/adverse-events/ael04.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Patient Deaths {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl out <- adsl %>% filter(!is.na(DTHADY)) %>% @@ -58,12 +56,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/concomitant-medications/cml01.qmd b/book/listings/concomitant-medications/cml01.qmd index 65e7ed40eb..4a02a43b6b 100644 --- a/book/listings/concomitant-medications/cml01.qmd +++ b/book/listings/concomitant-medications/cml01.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Previous and Concomitant Medications {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adcm <- synthetic_cdisc_dataset("latest", "adcm") +adcm <- random.cdisc.data::cadcm out <- adcm %>% filter(!is.na(CMDECOD)) %>% @@ -69,12 +67,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/concomitant-medications/cml02a_gl.qmd b/book/listings/concomitant-medications/cml02a_gl.qmd index 9df1ec3533..97f00bc712 100644 --- a/book/listings/concomitant-medications/cml02a_gl.qmd +++ b/book/listings/concomitant-medications/cml02a_gl.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Concomitant Medication Class Level 2, Preferred Name, and I {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adcm <- synthetic_cdisc_dataset("latest", "adcm") +adcm <- random.cdisc.data::cadcm out <- adcm %>% select(ATC2, CMDECOD, CMTRT) %>% @@ -47,12 +45,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/concomitant-medications/cml02b_gl.qmd b/book/listings/concomitant-medications/cml02b_gl.qmd index d047d9b72a..791697e0ca 100644 --- a/book/listings/concomitant-medications/cml02b_gl.qmd +++ b/book/listings/concomitant-medications/cml02b_gl.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Concomitant Medication Class, Preferred Name, and Investiga {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adcm <- synthetic_cdisc_dataset("latest", "adcm") +adcm <- random.cdisc.data::cadcm out <- adcm %>% select(ATC1, ATC2, ATC3, ATC4, CMDECOD, CMTRT) %>% @@ -50,12 +48,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/development-safety-update-report/dsur4.qmd b/book/listings/development-safety-update-report/dsur4.qmd index d5ad418f94..7aeec06163 100644 --- a/book/listings/development-safety-update-report/dsur4.qmd +++ b/book/listings/development-safety-update-report/dsur4.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Patients Who Died During Reporting Period {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl out <- adsl %>% filter(DTHFL == "Y") %>% @@ -49,12 +47,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/disposition/dsl01.qmd b/book/listings/disposition/dsl01.qmd index 5fe113e61d..b9ca905f25 100644 --- a/book/listings/disposition/dsl01.qmd +++ b/book/listings/disposition/dsl01.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Patients with Study Drug Withdrawn Due to Adverse Events {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl out <- adsl %>% filter(AEWITHFL == "Y") %>% @@ -57,12 +55,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/disposition/dsl02.qmd b/book/listings/disposition/dsl02.qmd index 67a11e97d5..4fc094fc18 100644 --- a/book/listings/disposition/dsl02.qmd +++ b/book/listings/disposition/dsl02.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Patients Who Discontinued Early from Study {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl out <- adsl %>% filter(AEWITHFL == "Y") %>% @@ -65,12 +63,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/efficacy/oncl01.qmd b/book/listings/efficacy/oncl01.qmd index 032bebaa89..2275924d82 100644 --- a/book/listings/efficacy/oncl01.qmd +++ b/book/listings/efficacy/oncl01.qmd @@ -7,20 +7,18 @@ subtitle: Listing of Individual Efficacy Data {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(rlistings) -adrs <- synthetic_cdisc_dataset("latest", "adrs") -adtte <- synthetic_cdisc_dataset("latest", "adtte") -adex <- synthetic_cdisc_dataset("latest", "adex") +adrs <- random.cdisc.data::cadrs +adtte <- random.cdisc.data::cadtte +adex <- random.cdisc.data::cadex out_ex <- adex %>% filter(PARAMCD == "TNDOSE") %>% @@ -109,12 +107,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/exposure/exl01.qmd b/book/listings/exposure/exl01.qmd index 76d9850d5e..7f038401a0 100644 --- a/book/listings/exposure/exl01.qmd +++ b/book/listings/exposure/exl01.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Exposure to Study Drug {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adex <- synthetic_cdisc_dataset("latest", "adex") +adex <- random.cdisc.data::cadex out <- adex %>% filter(PARAMCD == "DOSE" & !is.na(AVAL) & SAFFL == "Y") %>% @@ -57,12 +55,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/lab-results/lbl01.qmd b/book/listings/lab-results/lbl01.qmd index 8edc48dffd..85e76dfbbd 100644 --- a/book/listings/lab-results/lbl01.qmd +++ b/book/listings/lab-results/lbl01.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Laboratory Test Results {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adlb <- random.cdisc.data::cadlb adlb_x <- adlb %>% filter(!is.na(AVAL) & !is.na(LBSEQ) & !is.na(ADY) & ANRIND != "") %>% @@ -82,12 +80,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/lab-results/lbl01_rls.qmd b/book/listings/lab-results/lbl01_rls.qmd index b1601eb34a..7704ed3437 100644 --- a/book/listings/lab-results/lbl01_rls.qmd +++ b/book/listings/lab-results/lbl01_rls.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Laboratory Test Results Using Roche Safety Lab Standardizat {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adlb <- synthetic_cdisc_dataset("latest", "adlb") %>% +adlb <- random.cdisc.data::cadlb %>% filter(!is.na(AVAL)) adlb_x <- adlb %>% @@ -87,12 +85,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/lab-results/lbl02a.qmd b/book/listings/lab-results/lbl02a.qmd index d4ffd25287..3633679552 100644 --- a/book/listings/lab-results/lbl02a.qmd +++ b/book/listings/lab-results/lbl02a.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Laboratory Abnormalities (constant units) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adlb <- random.cdisc.data::cadlb adlb_x <- adlb %>% filter( @@ -82,12 +80,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/lab-results/lbl02a_rls.qmd b/book/listings/lab-results/lbl02a_rls.qmd index 61e1aa523f..8bce42289a 100644 --- a/book/listings/lab-results/lbl02a_rls.qmd +++ b/book/listings/lab-results/lbl02a_rls.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Laboratory Abnormalities Defined by Roche Safety Lab Standa {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adlb <- random.cdisc.data::cadlb adlb_x <- adlb %>% filter( @@ -102,12 +100,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/lab-results/lbl02b.qmd b/book/listings/lab-results/lbl02b.qmd index 141c5d935b..ad115cfce3 100644 --- a/book/listings/lab-results/lbl02b.qmd +++ b/book/listings/lab-results/lbl02b.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Laboratory Abnormalities (variable units) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adlb <- random.cdisc.data::cadlb adlb_x <- adlb %>% filter( @@ -83,12 +81,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/medical-history/mhl01.qmd b/book/listings/medical-history/mhl01.qmd index b57f603b52..f88b5efa20 100644 --- a/book/listings/medical-history/mhl01.qmd +++ b/book/listings/medical-history/mhl01.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Medical History and Concurrent Diseases {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -admh <- synthetic_cdisc_dataset("latest", "admh") +admh <- random.cdisc.data::cadmh out <- admh %>% mutate( @@ -61,12 +59,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/pharmacokinetic/pkcl01.qmd b/book/listings/pharmacokinetic/pkcl01.qmd index e24972fc40..b188fbb186 100644 --- a/book/listings/pharmacokinetic/pkcl01.qmd +++ b/book/listings/pharmacokinetic/pkcl01.qmd @@ -7,18 +7,16 @@ subtitle: Listing of Drug A Concentration by Treatment Group, Patient and Nomina {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(rlistings) -library(scda) -library(scda.2022) library(dplyr) -adpc <- synthetic_cdisc_dataset("latest", "adpc") +adpc <- random.cdisc.data::cadpc analyte <- "Plasma Drug X" @@ -57,12 +55,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/pharmacokinetic/pkcl02.qmd b/book/listings/pharmacokinetic/pkcl02.qmd index 238164a630..92c93e82fa 100644 --- a/book/listings/pharmacokinetic/pkcl02.qmd +++ b/book/listings/pharmacokinetic/pkcl02.qmd @@ -7,7 +7,7 @@ subtitle: Listing of Drug A Urine Concentration and Volumes {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,13 +15,11 @@ subtitle: Listing of Drug A Urine Concentration and Volumes library(dplyr) library(rlistings) -library(scda) -library(scda.2022) drug_a <- "Drug X" spec <- "URINE" -adpc <- synthetic_cdisc_dataset("latest", "adpc") +adpc <- random.cdisc.data::cadpc adpc_x <- adpc %>% mutate(REGIMEN = ifelse("REGIMEN" %in% names(adpc), REGIMEN, "BID")) %>% filter( @@ -90,12 +88,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/pharmacokinetic/pkpl01.qmd b/book/listings/pharmacokinetic/pkpl01.qmd index 7bfa1418f6..22d44ec737 100644 --- a/book/listings/pharmacokinetic/pkpl01.qmd +++ b/book/listings/pharmacokinetic/pkpl01.qmd @@ -7,7 +7,7 @@ subtitle: Listing of Drug A Plasma PK Parameters {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,13 +15,11 @@ subtitle: Listing of Drug A Plasma PK Parameters library(dplyr) library(rlistings) -library(scda) -library(scda.2022) drug_a <- "Plasma Drug X" spec <- "Plasma" -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp_x <- adpp %>% filter( PPCAT == drug_a, PPSPEC == spec @@ -61,12 +59,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/pharmacokinetic/pkpl02.qmd b/book/listings/pharmacokinetic/pkpl02.qmd index 48e9ec5393..f6393f4019 100644 --- a/book/listings/pharmacokinetic/pkpl02.qmd +++ b/book/listings/pharmacokinetic/pkpl02.qmd @@ -7,7 +7,7 @@ subtitle: Listing of Drug A Urine PK Parameters {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,13 +15,11 @@ subtitle: Listing of Drug A Urine PK Parameters library(dplyr) library(rlistings) -library(scda) -library(scda.2022) drug_a <- "Plasma Drug X" spec <- "Urine" -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp_x <- adpp %>% filter( PPCAT == drug_a, PPSPEC == spec @@ -62,12 +60,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/pharmacokinetic/pkpl04.qmd b/book/listings/pharmacokinetic/pkpl04.qmd index 8c0ec70255..82435f15e5 100644 --- a/book/listings/pharmacokinetic/pkpl04.qmd +++ b/book/listings/pharmacokinetic/pkpl04.qmd @@ -7,7 +7,7 @@ subtitle: Listing of Individual Drug A AUCIFO and CMAX Ratios Following Drug A o {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,10 +15,8 @@ subtitle: Listing of Individual Drug A AUCIFO and CMAX Ratios Following Drug A o library(dplyr) library(rlistings) -library(scda) -library(scda.2022) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp visit <- "CYCLE 1 DAY 1" drug_a <- "Plasma Drug X" # numerator drug @@ -77,12 +75,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/listings/vital-signs/vsl01.qmd b/book/listings/vital-signs/vsl01.qmd index a8bce52275..db23f6a832 100644 --- a/book/listings/vital-signs/vsl01.qmd +++ b/book/listings/vital-signs/vsl01.qmd @@ -7,18 +7,16 @@ subtitle: 'Listing of Vital Signs: Safety-Evaluable Patients' {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(rlistings) -advs <- synthetic_cdisc_dataset("latest", "advs") +advs <- random.cdisc.data::cadvs get_param_unit_range <- function(dataset) { u_rng <- lapply(unique(dataset$PARAMCD), function(p) { @@ -131,12 +129,10 @@ lsting <- as_listing( head(lsting, 20) ``` -`r webr_code_labels <- c("setup", "lsting")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lsting")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ADA/adat01.qmd b/book/tables/ADA/adat01.qmd index cd9f87b356..12c282701b 100644 --- a/book/tables/ADA/adat01.qmd +++ b/book/tables/ADA/adat01.qmd @@ -7,7 +7,7 @@ subtitle: Baseline Prevalence and Incidence of Treatment Emergent ADA {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Baseline Prevalence and Incidence of Treatment Emergent ADA library(tern) library(dplyr) -library(scda) -library(scda.2022) library(tibble) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adab <- synthetic_cdisc_dataset("latest", "adab") +adsl <- random.cdisc.data::cadsl +adab <- random.cdisc.data::cadab combodf <- tribble( ~valname, ~label, ~levelcombo, ~exargs, @@ -135,6 +133,7 @@ adab_pb <- df_explicit_na(adab) %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} # Layout for Baseline Prevalence of NAbs lyt_bl <- basic_table(show_colcounts = TRUE) %>% @@ -241,8 +240,7 @@ main_footer(result) <- "ADA = Anti-Drug Antibodies (is also referred to as ATA, result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -256,5 +254,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ADA/adat02.qmd b/book/tables/ADA/adat02.qmd index 4daf4c1892..59c74f53d1 100644 --- a/book/tables/ADA/adat02.qmd +++ b/book/tables/ADA/adat02.qmd @@ -7,7 +7,7 @@ subtitle: Summary of Patients with Treatment-Induced ADA {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Summary of Patients with Treatment-Induced ADA library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adab <- synthetic_cdisc_dataset("latest", "adab") +adsl <- random.cdisc.data::cadsl +adab <- random.cdisc.data::cadab # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -141,8 +139,7 @@ main_footer(result) <- paste( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -156,5 +153,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ADA/adat03.qmd b/book/tables/ADA/adat03.qmd index 8a5b762ae8..53d56596a5 100644 --- a/book/tables/ADA/adat03.qmd +++ b/book/tables/ADA/adat03.qmd @@ -7,20 +7,18 @@ subtitle: Summary of Serum Concentrations at Timepoints Where ADA Samples Were C {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adab <- synthetic_cdisc_dataset("latest", "adab") -adpc <- synthetic_cdisc_dataset("latest", "adpc") +adsl <- random.cdisc.data::cadsl +adab <- random.cdisc.data::cadab +adpc <- random.cdisc.data::cadpc # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -118,8 +116,7 @@ fnotes_at_path(result, rowpath = NULL, colpath = c("multivars", "AVAL_LT")) <- " result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -133,5 +130,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ADA/adat04a.qmd b/book/tables/ADA/adat04a.qmd index ee8edc7188..06df2af18a 100644 --- a/book/tables/ADA/adat04a.qmd +++ b/book/tables/ADA/adat04a.qmd @@ -7,7 +7,7 @@ subtitle: Baseline Prevalence and Incidence of Treatment Emergent NAbs {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Baseline Prevalence and Incidence of Treatment Emergent NAbs library(tern) library(dplyr) -library(scda) -library(scda.2022) library(tibble) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adab <- synthetic_cdisc_dataset("latest", "adab") +adsl <- random.cdisc.data::cadsl +adab <- random.cdisc.data::cadab combodf <- tribble( ~valname, ~label, ~levelcombo, ~exargs, @@ -162,6 +160,7 @@ adab_pb <- df_explicit_na(adab) %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} # Layout for Baseline Prevalence of NAbs lyt_bl <- basic_table(show_colcounts = TRUE) %>% @@ -267,8 +266,7 @@ Treatment unaffected = A post-baseline evaluable patient with a positive result result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -282,5 +280,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ADA/adat04b.qmd b/book/tables/ADA/adat04b.qmd index 5fc4dc1f42..88040b3475 100644 --- a/book/tables/ADA/adat04b.qmd +++ b/book/tables/ADA/adat04b.qmd @@ -7,7 +7,7 @@ subtitle: Baseline Prevalence and Incidence of NAbs {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Baseline Prevalence and Incidence of NAbs library(tern) library(dplyr) -library(scda) -library(scda.2022) library(tibble) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adab <- synthetic_cdisc_dataset("latest", "adab") +adsl <- random.cdisc.data::cadsl +adab <- random.cdisc.data::cadab combodf <- tribble( ~valname, ~label, ~levelcombo, ~exargs, @@ -142,6 +140,7 @@ adab_pb <- left_join(adab_pb_ada, adab_pb_adap, by = mergecol) %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} # Layout for Baseline Prevalence of NAbs lyt_bl <- basic_table(show_colcounts = TRUE) %>% @@ -226,8 +225,7 @@ Number of patients positive for NAb = the number (and percentage) of post-baseli result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -241,5 +239,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ECG/egt01.qmd b/book/tables/ECG/egt01.qmd index 66202265cd..d8a4476a17 100644 --- a/book/tables/ECG/egt01.qmd +++ b/book/tables/ECG/egt01.qmd @@ -7,7 +7,7 @@ subtitle: ECG Results and Change from Baseline by Visit {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,16 +15,14 @@ subtitle: ECG Results and Change from Baseline by Visit library(dplyr) library(tern) -library(scda) -library(scda.2022) # Data should be filtered for the studied Parameter (`PARAM`) and the # Analysis Visit (`AVISIT`). According to the GDSR template, the values for # the `AVISIT` reported in the EGT01 standard may be: # 'POST-BASELINE MAXIMUM', 'POST-BASELINE MINIMUM', 'POST-BASELINE LAST'. -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adeg <- synthetic_cdisc_dataset("latest", "adeg") +adsl <- random.cdisc.data::cadsl +adeg <- random.cdisc.data::cadeg # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -83,8 +81,7 @@ result <- build_table(lyt, adeg_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -95,17 +92,16 @@ result ## {{< fa regular file-lines fa-sm fa-fw >}} Preview + ```{r teal, opts.label = c("skip_if_testing", "app"), eval = packageVersion("teal.modules.clinical") >= "0.9.0.9007"} library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEG <- synthetic_cdisc_dataset("latest", "adeg") + ADSL <- random.cdisc.data::cadsl + ADEG <- random.cdisc.data::cadeg # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -156,5 +152,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ECG/egt02.qmd b/book/tables/ECG/egt02.qmd index 92e2e3a204..008c4691d6 100644 --- a/book/tables/ECG/egt02.qmd +++ b/book/tables/ECG/egt02.qmd @@ -7,19 +7,17 @@ subtitle: ECG Abnormalities (EGT02_1 & EGT02_2) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adeg <- synthetic_cdisc_dataset("latest", "adeg") +adsl <- random.cdisc.data::cadsl +adeg <- random.cdisc.data::cadeg # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -59,8 +57,7 @@ result <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## ECG Abnormalities Among Subjects
Without Abnormality at Baseline @@ -86,8 +83,7 @@ result <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -103,11 +99,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEG <- synthetic_cdisc_dataset("latest", "adeg") + ADSL <- random.cdisc.data::cadsl + ADEG <- random.cdisc.data::cadeg }) datanames <- c("ADSL", "ADEG") datanames(data) <- datanames @@ -151,5 +145,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ECG/egt03.qmd b/book/tables/ECG/egt03.qmd index 0e5475fe53..deb0922979 100644 --- a/book/tables/ECG/egt03.qmd +++ b/book/tables/ECG/egt03.qmd @@ -7,18 +7,16 @@ subtitle: Shift Table of ECG Interval Data -- Baseline Versus Minimum/Maximum Po {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adeg <- synthetic_cdisc_dataset("latest", "adeg") +adeg <- random.cdisc.data::cadeg # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adeg <- df_explicit_na(adeg) @@ -95,8 +93,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of Baseline Versus
Maximum Post-Baseline @@ -149,8 +146,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -166,11 +162,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEG <- synthetic_cdisc_dataset("latest", "adeg") + ADSL <- random.cdisc.data::cadsl + ADEG <- random.cdisc.data::cadeg }) datanames <- c("ADSL", "ADEG") datanames(data) <- datanames @@ -227,5 +221,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ECG/egt04.qmd b/book/tables/ECG/egt04.qmd index 5b7d4a98bb..2ffb6b6246 100644 --- a/book/tables/ECG/egt04.qmd +++ b/book/tables/ECG/egt04.qmd @@ -7,7 +7,7 @@ subtitle: Shift Table of Qualitative ECG Assessments {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup For the EGT04 template, data imputation should be avoided, and missing data explicit and accounted for, so the contingency table sum adds up to the group N. @@ -16,14 +16,12 @@ For illustration purposes, missing data are added to the example dataset. ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) set.seed(123) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adeg <- synthetic_cdisc_dataset("latest", "adeg") +adsl <- random.cdisc.data::cadsl +adeg <- random.cdisc.data::cadeg # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -89,8 +87,7 @@ result <- build_table(lyt, adeg_f) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -104,5 +101,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/ECG/egt05_qtcat.qmd b/book/tables/ECG/egt05_qtcat.qmd index 9e7b066933..ca4788a61d 100644 --- a/book/tables/ECG/egt05_qtcat.qmd +++ b/book/tables/ECG/egt05_qtcat.qmd @@ -7,19 +7,17 @@ subtitle: ECG Actual Values and Changes from Baseline by Visit {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adeg <- synthetic_cdisc_dataset("latest", "adeg") +adsl <- random.cdisc.data::cadsl +adeg <- random.cdisc.data::cadeg # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -107,8 +105,7 @@ result <- build_table(lyt = lyt, df = adeg_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -124,12 +121,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEG <- synthetic_cdisc_dataset("latest", "adeg") + ADSL <- random.cdisc.data::cadsl + ADEG <- random.cdisc.data::cadeg # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -225,5 +220,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet01.qmd b/book/tables/adverse-events/aet01.qmd index 9fdc2a8ee8..15c3e5e9bd 100644 --- a/book/tables/adverse-events/aet01.qmd +++ b/book/tables/adverse-events/aet01.qmd @@ -7,7 +7,7 @@ subtitle: Safety Summary {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup To illustrate, additional variables such as flags (TRUE/FALSE) for select AEs of interest and select AE baskets are added to the `adae` dataset. @@ -17,11 +17,9 @@ To illustrate, additional variables such as flags (TRUE/FALSE) for select AEs of library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -82,6 +80,7 @@ adae <- adae %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} aesi_vars <- c("FATAL", "SER", "SERWD", "SERDSM", "RELSER", "WD", "DSM", "REL", "RELWD", "RELDSM", "SEV") @@ -138,8 +137,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Medical
Concepts Section @@ -212,8 +210,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with
Modified Rows @@ -281,8 +278,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Rows Counting
Events & Additional Sections @@ -366,8 +362,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -383,12 +378,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae add_event_flags <- function(dat) { dat %>% @@ -458,5 +451,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet01_aesi.qmd b/book/tables/adverse-events/aet01_aesi.qmd index 66f13cfbd8..93c5e48f3d 100644 --- a/book/tables/adverse-events/aet01_aesi.qmd +++ b/book/tables/adverse-events/aet01_aesi.qmd @@ -7,8 +7,7 @@ subtitle: Safety Summary (Adverse Events of Special Interest) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} - +::: panel-tabset ## Data Setup To illustrate, additional variables such as flags (TRUE/FALSE) for selected AEs of interest. @@ -19,11 +18,9 @@ Please consult your SAP on how to handle missing AE grades. library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae adsl <- filter(adsl, SAFFL == "Y") adae <- filter(adae, ANL01FL == "Y" & SAFFL == "Y") @@ -172,8 +169,7 @@ result <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with
Optional Lines @@ -245,8 +241,7 @@ result <- build_table(lyt_adae, df = adae, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table For Studies
with Multiple Drugs @@ -255,8 +250,8 @@ result ## {{< fa regular file-lines fa-sm fa-fw >}} Preview ```{r variant3, test = list(result_v3 = "result")} -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae_mult <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae_mult <- random.cdisc.data::cadae adsl <- filter(adsl, SAFFL == "Y") adae_mult <- filter(adae_mult, ANL01FL == "Y" & SAFFL == "Y") @@ -533,8 +528,8 @@ result ``` -`r webr_code_labels <- c("variant3")` -{{< include ../../_utils/webr.qmd >}} + +`r webr_code_labels <- c("variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs
by SMQ @@ -543,8 +538,8 @@ result ## {{< fa regular file-lines fa-sm fa-fw >}} Preview ```{r variant4, test = list(result_v4 = "result")} -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae adsl <- filter(adsl, SAFFL == "Y") adae <- filter(adae, ANL01FL == "Y" & SAFFL == "Y") @@ -714,8 +709,7 @@ result <- build_table(lyt_adae, df = adae_smq, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -731,12 +725,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae ADAE <- filter(ADAE, ANL01FL == "Y" & SAFFL == "Y") not_resolved <- ADAE %>% @@ -848,5 +840,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet02.qmd b/book/tables/adverse-events/aet02.qmd index 4afdde78f7..746599c55a 100644 --- a/book/tables/adverse-events/aet02.qmd +++ b/book/tables/adverse-events/aet02.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events {{< include ../../_utils/envir_hook.qmd >}} -::::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Adverse Events library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -77,8 +75,7 @@ result <- build_table(lyt, df = adae, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: The variable `result` corresponds to the adverse events table. @@ -103,8 +100,7 @@ result <- result %>% result ``` -`r webr_code_labels <- c("setup", "variant1", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with
Event Totals @@ -163,8 +159,7 @@ result <- build_table(lyt, df = adae, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with
High-Level Term @@ -237,8 +232,7 @@ result <- build_table(lyt, df = adae, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Preferred
Terms Only @@ -270,8 +264,7 @@ result <- build_table(lyt, df = adae, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Fill-In of
Treatment Groups @@ -325,8 +318,7 @@ result <- build_table(lyt, df = adae_5, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant6")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs with an Incidence Rate
$\geq$ 5% in Any Treatment Group (subsetting
preferred terms based on frequency) @@ -380,8 +372,7 @@ result <- prune_table(result, keep_rows(row_condition)) result ``` -`r webr_code_labels <- c("setup", "variant7")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant7")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs with an Incidence Rate $\geq$ 5% in
Any Treatment Group (subsetting preferred terms
based on frequency with high-level terms) @@ -451,8 +442,7 @@ result <- prune_table(result, keep_rows(row_condition)) result ``` -`r webr_code_labels <- c("setup", "variant8")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant8")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs with an Incidence Rate $\geq$ 10%
in Any Treatment Group (subsetting
preferred terms based on frequency) @@ -506,8 +496,7 @@ result <- prune_table(result, keep_rows(row_condition)) result ``` -`r webr_code_labels <- c("setup", "variant9")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant9")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs with an Incidence Rate $\geq$ 3
Patients in Any Treatment Group (subsetting
preferred terms based on number of patients) @@ -561,8 +550,7 @@ result <- prune_table(result, keep_rows(row_condition)) result ``` -`r webr_code_labels <- c("setup", "variant10")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant10")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs with a Difference in Incidence Rate $\geq$ 5%
Between Any Treatment (subsetting preferred terms based
on difference in percentage between treatment groups) @@ -616,8 +604,7 @@ result <- prune_table(result, keep_rows(row_condition)) result ``` -`r webr_code_labels <- c("setup", "variant11")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant11")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs with an Incidence Rate $\geq$ 5%
in B: Placebo (subsetting preferred terms based
on frequency for a particular treatment group) @@ -671,8 +658,7 @@ result <- prune_table(result, keep_rows(row_condition)) result ``` -`r webr_code_labels <- c("setup", "variant12")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant12")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of AEs with a Difference in Incidence Rate $\geq$ 5% Between
Arm A and Arm B or Arm C (displaying preferred terms with a
difference of at least x% between selected treatment groups) @@ -725,8 +711,7 @@ result <- prune_table(result, keep_rows(row_condition)) result ``` -`r webr_code_labels <- c("setup", "variant13")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant13")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -742,11 +727,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -788,5 +771,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet02_smq.qmd b/book/tables/adverse-events/aet02_smq.qmd index be1423b7a0..5b317a32a2 100644 --- a/book/tables/adverse-events/aet02_smq.qmd +++ b/book/tables/adverse-events/aet02_smq.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events by Standardized MedDRA Query {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Adverse Events by Standardized MedDRA Query library(dplyr) library(tern) -library(scda) -library(scda.2022) library(stringr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -121,8 +119,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Customized Queries @@ -184,8 +181,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -201,11 +197,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae }) datanames <- c("ADSL", "ADAE") datanames(data) <- datanames @@ -256,5 +250,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet03.qmd b/book/tables/adverse-events/aet03.qmd index 4f9e670c26..eaf47b8e95 100644 --- a/book/tables/adverse-events/aet03.qmd +++ b/book/tables/adverse-events/aet03.qmd @@ -7,18 +7,16 @@ subtitle: Adverse Events by Greatest Intensity {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -107,8 +105,8 @@ result ``` -`r webr_code_labels <- c("setup", "pre-processing", "variant1")` -{{< include ../../_utils/webr.qmd >}} + +`r webr_code_labels <- c("setup", "pre-processing", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -124,11 +122,8 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae }) datanames <- c("ADSL", "ADAE") datanames(data) <- datanames @@ -168,5 +163,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet04.qmd b/book/tables/adverse-events/aet04.qmd index 54e9356b49..70032bef84 100644 --- a/book/tables/adverse-events/aet04.qmd +++ b/book/tables/adverse-events/aet04.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events by Highest NCI CTCAE Grade {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Adverse Events by Highest NCI CTCAE Grade library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) %>% filter(TRT01A != "") @@ -192,8 +190,7 @@ result <- lyt %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Fill-In
of Treatment Groups @@ -268,8 +265,7 @@ result <- lyt %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Fill-In
of Grades @@ -341,8 +337,7 @@ result <- lyt %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Collapsing
of Grades @@ -420,8 +415,7 @@ result <- lyt %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Using Worst Grade
Flags from ADAE @@ -537,8 +531,7 @@ result <- lyt %>% result ``` -`r webr_code_labels <- c("setup", "variant6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant6")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with an Incidence Rate
$\geq$ X%, Totals Unrestricted @@ -560,8 +553,7 @@ result <- prune_table(raw_table, keep_content_rows(my_row_condition(row_conditio result ``` -`r webr_code_labels <- c("setup", "variant8")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant8")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with a Difference in
Incidence Rate $\geq$ 10% @@ -578,14 +570,12 @@ result <- prune_table(raw_table, keep_content_rows(my_row_condition(row_conditio result ``` -`r webr_code_labels <- c("setup", "variant9")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant9")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with an Incidence Rate
$\geq$ 5%, SOCs \< 5% Removed -Variant 10 was not done -With this variant, SOC levels above the threshold are still in the table even if there are no terms left. +Variant 10 was not done With this variant, SOC levels above the threshold are still in the table even if there are no terms left. ## Table with an Incidence Rate $\geq$ 40%,
All SOCs w/o Preferred Terms Removed @@ -601,8 +591,7 @@ result <- prune_table(raw_table, keep_content_rows(my_row_condition(row_conditio result ``` -`r webr_code_labels <- c("setup", "variant11")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant11")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -618,11 +607,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae }) datanames <- c("ADSL", "ADAE") datanames(data) <- datanames @@ -662,5 +649,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet04_pi.qmd b/book/tables/adverse-events/aet04_pi.qmd index ee3863e21a..1c4d4f0e6f 100644 --- a/book/tables/adverse-events/aet04_pi.qmd +++ b/book/tables/adverse-events/aet04_pi.qmd @@ -7,14 +7,12 @@ subtitle: Adverse Events Reported in $\geq$ 10% of Patients by Highest NCI CTCAE {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) @@ -68,8 +66,8 @@ criteria_fun <- function(tr) { is(tr, "ContentRow") } -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae_max <- synthetic_cdisc_dataset("latest", "adae") %>% +adsl <- random.cdisc.data::cadsl +adae_max <- random.cdisc.data::cadae %>% preprocess_adae() %>% df_explicit_na() ``` @@ -101,8 +99,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Patients Treated with a Particular Treatment by Highest NCI
CTCAE Grade (specifying a treatment for selecting preferred terms) @@ -136,8 +133,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events Reported in $\geq$ 5% of Patients by
Highest NCI CTCAE Grade (changing the threshold) @@ -171,8 +167,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events Reported in $\geq$ 5% of Patients and
$\geq$ 2% Difference Between Treatments by Highest
NCI CTCAE Grade (using more than one condition) @@ -207,8 +202,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events Reported in $\geq$ 10% of Patients for Any Grade
or $\geq$ 5% of Patients for Grade 3-4 by Highest NCI CTCAE
Grade (using different condition depending on the grade) @@ -244,8 +238,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: ## Standard Table with
Modified Grade Grouping @@ -309,8 +302,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant6")` {{< include ../../_utils/webr.qmd >}} ::: ## Standard Table with
Overlapping Grade Groupings @@ -373,8 +365,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant7")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant7")` {{< include ../../_utils/webr.qmd >}} ::: ## Standard Table without SOCs @@ -421,8 +412,7 @@ result <- full_table %>% result ``` -`r webr_code_labels <- c("setup", "variant8")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant8")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -438,11 +428,8 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae }) datanames <- c("ADSL", "ADAE") datanames(data) <- datanames @@ -489,5 +476,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet05.qmd b/book/tables/adverse-events/aet05.qmd index fd1aa547e0..a69466f678 100644 --- a/book/tables/adverse-events/aet05.qmd +++ b/book/tables/adverse-events/aet05.qmd @@ -7,19 +7,17 @@ subtitle: Adverse Event Rate Adjusted for Patient-Years at Risk -- First Occurre {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adaette <- synthetic_cdisc_dataset("latest", "adaette") +adsl <- random.cdisc.data::cadsl +adaette <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -50,8 +48,7 @@ result <- build_table(lyt, anl, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Setting Type of Confidence Interval @@ -79,8 +76,7 @@ result <- build_table(lyt, anl, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -96,12 +92,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - library(dplyr) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAETTE <- synthetic_cdisc_dataset("latest", "adaette") + ADSL <- random.cdisc.data::cadsl + ADAETTE <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -151,5 +145,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet05_all.qmd b/book/tables/adverse-events/aet05_all.qmd index c0ece0e99c..0dc812ac5f 100644 --- a/book/tables/adverse-events/aet05_all.qmd +++ b/book/tables/adverse-events/aet05_all.qmd @@ -7,19 +7,17 @@ subtitle: Adverse Event Rate Adjusted for Patient-Years at Risk -- All Occurrenc {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adaette <- synthetic_cdisc_dataset("latest", "adaette") +adsl <- random.cdisc.data::cadsl +adaette <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -56,8 +54,7 @@ result <- build_table(lyt, anl, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Setting Type of Confidence Interval @@ -80,8 +77,7 @@ result <- build_table(lyt, anl, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -97,12 +93,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAETTE <- synthetic_cdisc_dataset("latest", "adaette") + ADSL <- random.cdisc.data::cadsl + ADAETTE <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -159,5 +154,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet06.qmd b/book/tables/adverse-events/aet06.qmd index 5a9c6e9bfd..603b1fc71a 100644 --- a/book/tables/adverse-events/aet06.qmd +++ b/book/tables/adverse-events/aet06.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events by Baseline Characteristic {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Adverse Events by Baseline Characteristic library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") -adsub <- synthetic_cdisc_dataset("latest", "adsub") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae +adsub <- random.cdisc.data::cadsub adsub_bmi <- adsub %>% filter(PARAMCD == "BBMISI") %>% @@ -128,8 +126,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events by Other Baseline
Characteristics (e.g. Biomarker Group) @@ -189,8 +186,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events by Baseline Characteristic
from ADSUB (e.g. BMI Category) @@ -250,8 +246,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events by Regrouped Baseline
Characteristics (e.g. Race) @@ -312,8 +307,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events by Baseline Characteristics
(e.g. Sex) Including High-Level Terms @@ -393,8 +387,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -410,11 +403,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -456,5 +447,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet06_smq.qmd b/book/tables/adverse-events/aet06_smq.qmd index dd539e5240..4fc8b7e1c5 100644 --- a/book/tables/adverse-events/aet06_smq.qmd +++ b/book/tables/adverse-events/aet06_smq.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events by Baseline Characteristic, by SMQ and Preferred Term {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Adverse Events by Baseline Characteristic, by SMQ and Preferred Term library(dplyr) library(tern) -library(scda) -library(scda.2022) library(stringr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae adsl_labels <- var_labels(adsl) adae_labels <- var_labels(adae) @@ -143,8 +141,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events by Sex, by SMQ and
Preferred Term (with Customized Queries) @@ -202,8 +199,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Adverse Events by Other Baseline
Characteristics (e.g. Age Group) @@ -253,8 +249,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -270,11 +265,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") %>% + ADSL <- random.cdisc.data::cadsl %>% mutate( AGE65 = case_when( AGE >= 65 ~ ">= 65", @@ -285,7 +279,7 @@ data <- within(data, { levels = c("< 65", ">= 65") ) ) - ADAE <- synthetic_cdisc_dataset("latest", "adae") %>% + ADAE <- random.cdisc.data::cadae %>% mutate( AGE65 = case_when( AGE >= 65 ~ ">= 65", @@ -347,5 +341,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet07.qmd b/book/tables/adverse-events/aet07.qmd index 917b1465ec..88bda81aef 100644 --- a/book/tables/adverse-events/aet07.qmd +++ b/book/tables/adverse-events/aet07.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events Resulting in Death {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup For illustrative purposes, we will pre-process `AESDTH` in ADAE so there are no deaths in arm A and concatenate `AEBODSYS` and `AEDECOD` as per GDSR output standards for AET07. @@ -17,11 +17,9 @@ For illustrative purposes, we will pre-process `AESDTH` in ADAE so there are no library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -78,8 +76,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Fill-In of Treatment Groups without Deaths @@ -116,8 +113,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -133,12 +129,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - library(dplyr) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -205,5 +199,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet09.qmd b/book/tables/adverse-events/aet09.qmd index b21eef9b85..2b9a0b35dc 100644 --- a/book/tables/adverse-events/aet09.qmd +++ b/book/tables/adverse-events/aet09.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events Related to Study Drug {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Adverse Events Related to Study Drug library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -96,8 +94,7 @@ result <- tbl1 %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Including High-Level Terms @@ -180,8 +177,7 @@ result <- tbl2 %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -197,11 +193,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -244,5 +238,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet09_smq.qmd b/book/tables/adverse-events/aet09_smq.qmd index e30063dc31..01b2e3f75a 100644 --- a/book/tables/adverse-events/aet09_smq.qmd +++ b/book/tables/adverse-events/aet09_smq.qmd @@ -7,7 +7,7 @@ subtitle: Adverse Events Related to Study Drug by Standardized MedDRA Query {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Adverse Events Related to Study Drug by Standardized MedDRA Query library(dplyr) library(tern) -library(scda) -library(scda.2022) library(stringr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing # levels. For details, refer to Teal and Study Data article. @@ -125,8 +123,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Customized Queries @@ -188,8 +185,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -209,11 +205,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae }) datanames <- c("ADSL", "ADAE") datanames(data) <- datanames @@ -266,5 +260,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/adverse-events/aet10.qmd b/book/tables/adverse-events/aet10.qmd index d5e7bcd518..fa7f438bd7 100644 --- a/book/tables/adverse-events/aet10.qmd +++ b/book/tables/adverse-events/aet10.qmd @@ -7,7 +7,7 @@ subtitle: Most Common ($\geq$ 5%) Adverse Events {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Most Common ($\geq$ 5%) Adverse Events library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -66,8 +64,7 @@ result <- sort_at_path( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Most Common ($\geq$ 35%) Adverse Events (setting threshold) @@ -108,8 +105,7 @@ result <- sort_at_path( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -128,11 +124,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAE <- synthetic_cdisc_dataset("latest", "adae") + + ADSL <- random.cdisc.data::cadsl + ADAE <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -175,5 +169,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/concomitant-medications/cmt01.qmd b/book/tables/concomitant-medications/cmt01.qmd index aa9420a4b1..42340a3db4 100644 --- a/book/tables/concomitant-medications/cmt01.qmd +++ b/book/tables/concomitant-medications/cmt01.qmd @@ -7,7 +7,7 @@ subtitle: Concomitant Medications (GNEDrug Legacy Coding) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,13 +15,11 @@ subtitle: Concomitant Medications (GNEDrug Legacy Coding) library(dplyr) library(tern) -library(scda) -library(scda.2022) # The following tables require ADCM data structure that follows the legacy concomitant medication coding. # WHO coding is not used. -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adcm <- synthetic_cdisc_dataset("latest", "adcm") +adsl <- random.cdisc.data::cadsl +adcm <- random.cdisc.data::cadcm # Below step is to set up example data based on legacy standard. adcm <- adcm %>% @@ -91,8 +89,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Showing Medications Prior
to the Start of the Study @@ -143,8 +140,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Subtotal Per
Medication Class Suppressed @@ -191,8 +187,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Sorted by Total Column Showing
Additional "All Patients" Column @@ -251,8 +246,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -270,12 +264,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADCM <- synthetic_cdisc_dataset("latest", "adcm") + ADSL <- random.cdisc.data::cadsl + ADCM <- random.cdisc.data::cadcm # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -322,5 +314,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/concomitant-medications/cmt01a.qmd b/book/tables/concomitant-medications/cmt01a.qmd index be7b5e7501..cf66946cfe 100644 --- a/book/tables/concomitant-medications/cmt01a.qmd +++ b/book/tables/concomitant-medications/cmt01a.qmd @@ -7,7 +7,7 @@ subtitle: Concomitant Medications by Medication Class and Preferred Name {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Concomitant Medications by Medication Class and Preferred Name library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adcm <- synthetic_cdisc_dataset("latest", "adcm") +adsl <- random.cdisc.data::cadsl +adcm <- random.cdisc.data::cadcm adcm$CMSEQ <- as.factor(adcm$CMSEQ) @@ -85,8 +83,7 @@ result <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Changing
ATC Class Level @@ -139,8 +136,7 @@ result <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Classes
Sorted by Frequency @@ -190,8 +186,7 @@ result <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Total Number of Treatments
per Medication Class Suppressed @@ -243,8 +238,7 @@ result <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -262,11 +256,9 @@ adcm_keys <- c("STUDYID", "USUBJID", "ASTDTM", "CMSEQ", "ATC1", "ATC2", "ATC3", ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADCM <- synthetic_cdisc_dataset("latest", "adcm") + + ADSL <- random.cdisc.data::cadsl + ADCM <- random.cdisc.data::cadcm ADCM$CMSEQ <- as.integer(ADCM$CMSEQ) ADSL <- df_explicit_na(ADSL) @@ -314,5 +306,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/concomitant-medications/cmt01b.qmd b/book/tables/concomitant-medications/cmt01b.qmd index 9996b2c2e2..ee2761a702 100644 --- a/book/tables/concomitant-medications/cmt01b.qmd +++ b/book/tables/concomitant-medications/cmt01b.qmd @@ -7,7 +7,7 @@ subtitle: Concomitant Medications by Medication Class and Preferred Name {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Concomitant Medications by Medication Class and Preferred Name library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adcm <- synthetic_cdisc_dataset("latest", "adcm") +adsl <- random.cdisc.data::cadsl +adcm <- random.cdisc.data::cadcm adcm$CMSEQ <- as.factor(adcm$CMSEQ) @@ -112,8 +110,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Changing
Class Levels @@ -178,8 +175,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Classes
Sorted by Frequency @@ -267,8 +263,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -286,11 +281,9 @@ adcm_keys <- c("STUDYID", "USUBJID", "ASTDTM", "CMSEQ", "ATC1", "ATC2", "ATC3", ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADCM <- synthetic_cdisc_dataset("latest", "adcm") + + ADSL <- random.cdisc.data::cadsl + ADCM <- random.cdisc.data::cadcm ADCM$CMSEQ <- as.integer(ADCM$CMSEQ) ADSL <- df_explicit_na(ADSL) @@ -337,5 +330,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/concomitant-medications/cmt02_pt.qmd b/book/tables/concomitant-medications/cmt02_pt.qmd index 34681f53aa..08fa740649 100644 --- a/book/tables/concomitant-medications/cmt02_pt.qmd +++ b/book/tables/concomitant-medications/cmt02_pt.qmd @@ -7,7 +7,7 @@ subtitle: Concomitant Medications by Preferred Name (WHODrug Coding) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Concomitant Medications by Preferred Name (WHODrug Coding) library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adcm <- synthetic_cdisc_dataset("latest", "adcm") +adsl <- random.cdisc.data::cadsl +adcm <- random.cdisc.data::cadcm adcm$CMSEQ <- as.factor(adcm$CMSEQ) @@ -69,8 +67,7 @@ result <- build_table(lyt = lyt, df = adcm, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -88,11 +85,9 @@ adcm_keys <- c("STUDYID", "USUBJID", "ASTDTM", "CMSEQ", "ATC1", "ATC2", "ATC3", ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADCM <- synthetic_cdisc_dataset("latest", "adcm") + + ADSL <- random.cdisc.data::cadsl + ADCM <- random.cdisc.data::cadcm ADCM$CMSEQ <- as.integer(ADCM$CMSEQ) ADSL <- df_explicit_na(ADSL) @@ -140,5 +135,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/deaths/dtht01.qmd b/book/tables/deaths/dtht01.qmd index c09d889b34..f7e283b9de 100644 --- a/book/tables/deaths/dtht01.qmd +++ b/book/tables/deaths/dtht01.qmd @@ -7,18 +7,16 @@ subtitle: Deaths {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) %>% filter(SAFFL == "Y") @@ -47,8 +45,7 @@ result <- build_table(lyt, df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting
Sections to Display @@ -92,8 +89,7 @@ result <- build_table(lyt, df = adsl) %>% prune_table() result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table for Studies Collecting Death
Information from Public Records @@ -144,8 +140,7 @@ result <- build_table(lyt, df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Adding Details for "All other causes"
Category for Studies Collecting Death
Information from Public Records @@ -206,8 +201,7 @@ result <- build_table(lyt, df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -221,5 +215,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/demography/dmt01.qmd b/book/tables/demography/dmt01.qmd index 773f379e52..08e4e96572 100644 --- a/book/tables/demography/dmt01.qmd +++ b/book/tables/demography/dmt01.qmd @@ -7,21 +7,19 @@ subtitle: Demographics and Baseline Characteristics {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) library(tidyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -advs <- synthetic_cdisc_dataset("latest", "advs") -adsub <- synthetic_cdisc_dataset("latest", "adsub") +adsl <- random.cdisc.data::cadsl +advs <- random.cdisc.data::cadvs +adsub <- random.cdisc.data::cadsub # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -114,8 +112,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with an Additional
Study-Specific Categorical Variable @@ -145,8 +142,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Subgrouping
for Some Analyses @@ -172,8 +168,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Additional Vital
Signs Baseline Values @@ -199,8 +194,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Additional
Values from ADSUB @@ -225,8 +219,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -242,10 +235,8 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") + + ADSL <- random.cdisc.data::cadsl # Include `EOSDY` and `DCSREAS` variables below because they contain missing data. stopifnot( @@ -281,5 +272,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/disclosures/disclosurest01.qmd b/book/tables/disclosures/disclosurest01.qmd index baca277361..e1995b78ac 100644 --- a/book/tables/disclosures/disclosurest01.qmd +++ b/book/tables/disclosures/disclosurest01.qmd @@ -7,18 +7,16 @@ subtitle: Disclosures Outputs {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Patient Disposition Table
(CTgov & EudraCT) #### Data Setup ```{r setup1, message = FALSE} library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -127,8 +125,7 @@ result <- build_table(lyt = lyt, df = adsl0) result ``` -`r webr_code_labels <- c("setup1", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup1", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Demographic Table
(CTgov & EudraCT) @@ -137,11 +134,9 @@ result ```{r setup2, message = FALSE} library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -187,8 +182,7 @@ result <- build_table(lyt = lyt, df = adsl) result ``` -`r webr_code_labels <- c("setup2", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup2", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Enrollment by Country
Table (EudraCT only) @@ -197,11 +191,9 @@ result ```{r setup3, message = FALSE} library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl adsl_labels <- var_labels(adsl) # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. @@ -230,8 +222,7 @@ result <- build_table(lyt, adsl) result ``` -`r webr_code_labels <- c("setup3", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup3", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Non-Serious Adverse Events
Reported in $\geq$ 5% of Patients in Any
Treatment Group (CTgov & EudraCT) @@ -242,12 +233,10 @@ Trimming function `get_adae_trimmed` is defined to filter AEs with greater than ```{r setup4, message = FALSE} library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -320,8 +309,7 @@ result <- build_table(lyt, adae_trim) result ``` -`r webr_code_labels <- c("setup4", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup4", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Serious Adverse Events, Fatal SAEs
and SAEs Related to Study Medication,
by Treatment Group (CTgov & EudraCT) @@ -332,11 +320,9 @@ For illustrative purposes, the `adae` data is filtered by arm "A: Drug X" here. ```{r setup5, message = FALSE} library(tern) -library(scda) -library(scda.2022) library(dplyr) -adae <- synthetic_cdisc_dataset("latest", "adae") +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adae <- df_explicit_na(adae) @@ -387,8 +373,7 @@ result <- build_table(lyt, adae_serious_arm) result ``` -`r webr_code_labels <- c("setup5", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup5", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: ## Death Table
(EudraCT only) @@ -397,12 +382,10 @@ result ```{r setup6, message = FALSE} library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae ``` #### Death Table @@ -424,12 +407,10 @@ result <- build_table(lyt, adae, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup6", "variant6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup6", "variant6")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/disclosures/eudrat01.qmd b/book/tables/disclosures/eudrat01.qmd index 60bdc3f53e..77df7423e3 100644 --- a/book/tables/disclosures/eudrat01.qmd +++ b/book/tables/disclosures/eudrat01.qmd @@ -7,7 +7,7 @@ subtitle: Non-Serious Adverse Events Reported in $\geq$ 5% of Patients in Any Tr {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup Define a trimming function `get_adae_trimmed` to filter for AEs of greater than 5% incidence rate. @@ -16,12 +16,10 @@ Define a trimming function `get_adae_trimmed` to filter for AEs of greater than #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -94,8 +92,7 @@ result <- build_table(lyt, adae_trim) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -109,5 +106,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/disclosures/eudrat02.qmd b/book/tables/disclosures/eudrat02.qmd index 498c1c6b40..9457d5224e 100644 --- a/book/tables/disclosures/eudrat02.qmd +++ b/book/tables/disclosures/eudrat02.qmd @@ -7,7 +7,7 @@ subtitle: Serious Adverse Events, Fatal Serious Adverse Events, and Serious Adve {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup For illustrative purposes, the `adae` data is filtered by arm `A: Drug X` here. @@ -16,11 +16,9 @@ For illustrative purposes, the `adae` data is filtered by arm `A: Drug X` here. #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adae <- synthetic_cdisc_dataset("latest", "adae") +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adae <- df_explicit_na(adae) @@ -71,8 +69,7 @@ result <- build_table(lyt, adae_serious_arm) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -86,5 +83,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/disposition/dst01.qmd b/book/tables/disposition/dst01.qmd index da6c08e7b0..8bd4059d30 100644 --- a/book/tables/disposition/dst01.qmd +++ b/book/tables/disposition/dst01.qmd @@ -7,19 +7,17 @@ subtitle: Patient Disposition {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) set.seed(1, kind = "Mersenne-Twister") -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl # reorder EOSSTT factor levels so DISCONTINUED is the last level adsl <- df_explicit_na(adsl) %>% @@ -69,8 +67,7 @@ result1 <- build_table(lyt = lyt, df = adsl) result1 ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Grouping of Reasons @@ -102,8 +99,7 @@ result2 <- prune_table(tbl) # remove rows containing all zeros result2 ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Adding Optional Rows @@ -132,8 +128,7 @@ result3 <- rbind(result2, tbl) result3 ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -149,12 +144,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - library(dplyr) + library(dplyr) set.seed(1, kind = "Mersenne-Twister") - ADSL <- synthetic_cdisc_dataset("latest", "adsl") + ADSL <- random.cdisc.data::cadsl ADSL <- df_explicit_na(ADSL) ADSL <- ADSL %>% mutate( @@ -208,5 +201,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/disposition/pdt01.qmd b/book/tables/disposition/pdt01.qmd index 22ae587327..8762438c2d 100644 --- a/book/tables/disposition/pdt01.qmd +++ b/book/tables/disposition/pdt01.qmd @@ -7,7 +7,7 @@ subtitle: Major Protocol Deviations {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Major Protocol Deviations library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -addv <- synthetic_cdisc_dataset("latest", "addv") +adsl <- random.cdisc.data::cadsl +addv <- random.cdisc.data::caddv # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -66,8 +64,7 @@ result <- build_table(lyt = lyt, df = addv, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -83,11 +80,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADDV <- synthetic_cdisc_dataset("latest", "addv") + + ADSL <- random.cdisc.data::cadsl + ADDV <- random.cdisc.data::caddv # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -129,5 +124,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/disposition/pdt02.qmd b/book/tables/disposition/pdt02.qmd index 3ab4ee01ca..42d0de725b 100644 --- a/book/tables/disposition/pdt02.qmd +++ b/book/tables/disposition/pdt02.qmd @@ -7,19 +7,17 @@ subtitle: Major Protocol Deviations Related to Epidemic/Pandemic {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -addv <- synthetic_cdisc_dataset("latest", "addv") +adsl <- random.cdisc.data::cadsl +addv <- random.cdisc.data::caddv adsl <- df_explicit_na(adsl) addv <- df_explicit_na(addv) @@ -67,8 +65,7 @@ result <- build_table(lyt, addv_pan, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -82,5 +79,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/aovt01.qmd b/book/tables/efficacy/aovt01.qmd index eb3cc8854d..da6da8424b 100644 --- a/book/tables/efficacy/aovt01.qmd +++ b/book/tables/efficacy/aovt01.qmd @@ -7,19 +7,17 @@ subtitle: ANCOVA for Multiple End Points {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -63,8 +61,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -80,11 +77,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADQS <- synthetic_cdisc_dataset("latest", "adqs") + + ADSL <- random.cdisc.data::cadsl + ADQS <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -147,5 +142,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/aovt02.qmd b/book/tables/efficacy/aovt02.qmd index 23d6093672..5b59b53466 100644 --- a/book/tables/efficacy/aovt02.qmd +++ b/book/tables/efficacy/aovt02.qmd @@ -10,19 +10,17 @@ subtitle: ANCOVA with Single End Point and Customized Table This example will focus on data from a single visit "WEEK 1 DAY 8" and a single endpoint "FKSI-FWB". Only evaluable populations will be analyzed. -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -70,8 +68,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -87,11 +84,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADQS <- synthetic_cdisc_dataset("latest", "adqs") + + ADSL <- random.cdisc.data::cadsl + ADQS <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -153,5 +148,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/aovt03.qmd b/book/tables/efficacy/aovt03.qmd index 310e379eef..ada40fbe99 100644 --- a/book/tables/efficacy/aovt03.qmd +++ b/book/tables/efficacy/aovt03.qmd @@ -9,19 +9,17 @@ subtitle: ANCOVA with Consideration of Interaction This example will focus on data from multiple visits and take the interaction between visits and arms into consideration. -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs adqs_in <- adqs %>% filter(AVISIT %in% c("WEEK 1 DAY 8", "WEEK 2 DAY 15", "WEEK 5 DAY 36")) %>% @@ -71,8 +69,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -86,5 +83,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/cfbt01.qmd b/book/tables/efficacy/cfbt01.qmd index 15c2ca985f..0c1dcd2621 100644 --- a/book/tables/efficacy/cfbt01.qmd +++ b/book/tables/efficacy/cfbt01.qmd @@ -7,19 +7,17 @@ subtitle: Efficacy Data and Change from Baseline by Visit {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -91,8 +89,7 @@ result <- build_table(lyt, adqs) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -108,11 +105,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADQS <- synthetic_cdisc_dataset("latest", "adqs") + + ADSL <- random.cdisc.data::cadsl + ADQS <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -167,5 +162,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/cmht01.qmd b/book/tables/efficacy/cmht01.qmd index 875aa2a542..34eb613939 100644 --- a/book/tables/efficacy/cmht01.qmd +++ b/book/tables/efficacy/cmht01.qmd @@ -7,19 +7,17 @@ subtitle: Cochran-Mantel-Haenszel (CMH) Summary {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -32,6 +30,7 @@ adqs <- df_explicit_na(adqs) ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("survival") < "3.5-8", "skip_test_strict", "")} anl_01 <- adqs %>% filter(PARAMCD == "FKSI-FWB" & AVISIT == "WEEK 1 DAY 8") %>% @@ -79,8 +78,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of Multiple Parameters @@ -89,6 +87,7 @@ result ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant2, test = list(result_v2 = "result"), opts.label = ifelse(packageVersion("survival") < "3.5-8", "skip_test_strict", "")} anl_02 <- adqs %>% filter(AVISIT == "WEEK 1 DAY 8") %>% @@ -147,8 +146,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -164,11 +162,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADRS <- synthetic_cdisc_dataset("latest", "adrs") + + ADSL <- random.cdisc.data::cadsl + ADRS <- random.cdisc.data::cadrs }) datanames <- c("ADSL", "ADRS") datanames(data) <- datanames @@ -212,5 +208,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/coxt01.qmd b/book/tables/efficacy/coxt01.qmd index bf00cafdf0..1a011afaa8 100644 --- a/book/tables/efficacy/coxt01.qmd +++ b/book/tables/efficacy/coxt01.qmd @@ -11,19 +11,17 @@ Cox models are the most commonly used methods to estimate the magnitude of the e It assumes proportional hazards; that is, it assumes that the ratio of the hazards of the two groups (e.g. two arms) is constant over time. This ratio is referred to as the "hazard ratio" and is one of the most commonly reported metrics to describe the effect size in survival analysis. -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adtte <- synthetic_cdisc_dataset("latest", "adtte") +adsl <- random.cdisc.data::cadsl +adtte <- random.cdisc.data::cadtte # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -77,8 +75,7 @@ result <- build_table(lyt = lyt, df = anl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Cox Regression
with Interaction Term @@ -110,8 +107,7 @@ result <- build_table(lyt = lyt, df = anl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Cox Regression
Specifying Covariates @@ -145,8 +141,7 @@ result <- build_table(lyt = lyt, df = anl) result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Cox Regression Setting
Strata, Ties, Alpha Level @@ -186,8 +181,7 @@ result <- build_table(lyt = lyt, df = anl) result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -214,11 +208,9 @@ arm_ref_comp <- list( ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADTTE <- synthetic_cdisc_dataset("latest", "adtte") + + ADSL <- random.cdisc.data::cadsl + ADTTE <- random.cdisc.data::cadtte # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -260,5 +252,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/coxt02.qmd b/book/tables/efficacy/coxt02.qmd index 2692540660..68faee58e4 100644 --- a/book/tables/efficacy/coxt02.qmd +++ b/book/tables/efficacy/coxt02.qmd @@ -13,19 +13,17 @@ It produces the estimates for each of the covariates included in the model. The analysis follows the same principles (i.e. stratified vs. unstratified analysis and tie handling) as the general Cox model analysis also used in `COXT01`. Since there is usually no pre-specified hypothesis testing for such analysis, the p-values must be interpreted with caution. -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) library(broom) -adtte <- synthetic_cdisc_dataset("latest", "adtte") +adtte <- random.cdisc.data::cadtte # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adtte <- df_explicit_na(adtte) @@ -78,8 +76,7 @@ result <- build_table(lyt = lyt, df = anl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Multivariable Cox Regression
with Interaction Term @@ -139,8 +136,7 @@ result <- build_table(lyt = lyt, df = anl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Multivariable Cox Regression
with Selection Process for Covariates @@ -160,11 +156,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADTTE <- synthetic_cdisc_dataset("latest", "adtte") + + ADSL <- random.cdisc.data::cadsl + ADTTE <- random.cdisc.data::cadtte }) datanames <- c("ADSL", "ADTTE") datanames(data) <- datanames @@ -212,5 +206,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/dort01.qmd b/book/tables/efficacy/dort01.qmd index 2d4ab97b2f..e05639a2cb 100644 --- a/book/tables/efficacy/dort01.qmd +++ b/book/tables/efficacy/dort01.qmd @@ -7,19 +7,17 @@ subtitle: Duration of Response {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adtte <- synthetic_cdisc_dataset("latest", "adtte") +adsl <- random.cdisc.data::cadsl +adtte <- random.cdisc.data::cadtte # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -98,8 +96,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting
Sections to Display @@ -160,8 +157,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying Analysis Details
like Conf. Type and Alpha Level @@ -222,8 +218,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying Time Point for
the "XX Months duration" Analysis @@ -282,8 +277,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -299,11 +293,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADTTE <- synthetic_cdisc_dataset("latest", "adtte") + + ADSL <- random.cdisc.data::cadsl + ADTTE <- random.cdisc.data::cadtte # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -364,5 +356,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/lgrt02.qmd b/book/tables/efficacy/lgrt02.qmd index 1023f52fbd..8c885e4261 100644 --- a/book/tables/efficacy/lgrt02.qmd +++ b/book/tables/efficacy/lgrt02.qmd @@ -7,19 +7,17 @@ subtitle: Multi-Variable Logistic Regression {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adrs <- synthetic_cdisc_dataset("latest", "adrs") +adsl <- random.cdisc.data::cadsl +adrs <- random.cdisc.data::cadrs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -70,8 +68,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Multi-Variable Logistic Regression
with Interaction Term @@ -105,8 +102,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Multi-Variable Logistic Regression
Specifying Covariates @@ -139,8 +135,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Multi-Variable Logistic Regression Setting
an Event, Alpha Level, and Level for Interaction @@ -175,8 +170,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -192,12 +186,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - library(dplyr) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADRS <- synthetic_cdisc_dataset("latest", "adrs") %>% + ADSL <- random.cdisc.data::cadsl + ADRS <- random.cdisc.data::cadrs %>% filter(PARAMCD %in% c("BESRSPI", "INVET")) }) datanames <- c("ADSL", "ADRS") @@ -248,5 +240,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/mmrmt01.qmd b/book/tables/efficacy/mmrmt01.qmd index 44ed9bf83d..8991f569a5 100644 --- a/book/tables/efficacy/mmrmt01.qmd +++ b/book/tables/efficacy/mmrmt01.qmd @@ -7,7 +7,7 @@ subtitle: Tables for Mixed-Effect Model Repeated Measures Analysis {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,12 +15,10 @@ subtitle: Tables for Mixed-Effect Model Repeated Measures Analysis library(dplyr) library(tern.mmrm) -library(scda) -library(scda.2022) library(broom) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adqs <- synthetic_cdisc_dataset("latest", "adqs") +adsl <- random.cdisc.data::cadsl +adqs <- random.cdisc.data::cadqs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -184,6 +182,7 @@ result #### Considering the treatment variable in the model + ```{r, opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} as.rtable(mmrm_results, type = "fixed") ``` @@ -191,6 +190,7 @@ as.rtable(mmrm_results, type = "fixed") #### Not considering the treatment variable in the model + ```{r, opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} as.rtable(mmrm_results_no_arm, type = "fixed") ``` @@ -198,6 +198,7 @@ as.rtable(mmrm_results_no_arm, type = "fixed") ## Covariance Matrix + ```{r, opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} as.rtable(mmrm_results, type = "cov") ``` @@ -221,12 +222,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADQS <- synthetic_cdisc_dataset("latest", "adqs") %>% + ADSL <- random.cdisc.data::cadsl + ADQS <- random.cdisc.data::cadqs %>% filter(ABLFL != "Y" & ABLFL2 != "Y") %>% filter(AVISIT %in% c("WEEK 1 DAY 8", "WEEK 2 DAY 15", "WEEK 3 DAY 22")) %>% mutate( @@ -276,5 +275,4 @@ shinyApp(app$ui, app$server) ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/onct05.qmd b/book/tables/efficacy/onct05.qmd index f568ffd8e3..eb7bc4632f 100644 --- a/book/tables/efficacy/onct05.qmd +++ b/book/tables/efficacy/onct05.qmd @@ -7,7 +7,7 @@ subtitle: Objective Response Rate by Subgroup {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Objective Response Rate by Subgroup library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adrs <- synthetic_cdisc_dataset("latest", "adrs") +adsl <- random.cdisc.data::cadsl +adrs <- random.cdisc.data::cadrs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -54,6 +52,7 @@ var_labels(anl) <- c(anl_labels, rsp = "Is Response") ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} df <- extract_rsp_subgroups( variables = list( @@ -70,8 +69,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Specifying
Class Variables @@ -83,6 +81,7 @@ Here, the levels of subgroup variables `SEX` and `STRATA1` are reordered. `STRATA1` is reordered by frequency. + ```{r variant2, test = list(result_v2 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} anl_reorder <- anl %>% mutate( @@ -101,8 +100,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting Columns
and Changing the Alpha Level @@ -111,6 +109,7 @@ result ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant3, test = list(result_v3 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} df <- extract_rsp_subgroups( variables = list( @@ -129,8 +128,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Setting Values
Indicating Response @@ -141,6 +139,7 @@ result Create a new variable `new_rsp` in `anl` data that uses new criteria for responder. + ```{r variant4, test = list(result_v4 = "result"), opts.label = ifelse(packageVersion("rtables") < "0.6.6.9011", "skip_test_strict", "")} anl_new <- anl %>% mutate(new_rsp = AVALC == "CR") @@ -160,8 +159,7 @@ result <- basic_table() %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -178,11 +176,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADRS <- synthetic_cdisc_dataset("latest", "adrs") + ADSL <- random.cdisc.data::cadsl + ADRS <- random.cdisc.data::cadrs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -242,5 +238,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/ratet01.qmd b/book/tables/efficacy/ratet01.qmd index 44bc468d63..3c0ec2f81f 100644 --- a/book/tables/efficacy/ratet01.qmd +++ b/book/tables/efficacy/ratet01.qmd @@ -10,18 +10,16 @@ subtitle: Event Rate Summary for Recurrent Events This example will focus on data from a single visit "WEEK 1 DAY 8" and a single endpoint "FKSI-FWB". Only evaluable populations will be analyzed. -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -anl <- synthetic_cdisc_dataset("latest", "adtte") %>% +anl <- random.cdisc.data::cadtte %>% filter(PARAMCD == "TNE") # Ensure number of exacerbation is a factor and NAs are explicit missing levels. @@ -35,6 +33,7 @@ anl <- df_explicit_na(anl) ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), eval = packageVersion("tern") >= "0.9.3.9005"} lyt <- basic_table(show_colcounts = TRUE) %>% split_cols_by("ARM", ref_group = "B: Placebo", split_fun = ref_group_position("first")) %>% @@ -91,8 +90,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -106,5 +104,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/rspt01.qmd b/book/tables/efficacy/rspt01.qmd index fafa971171..3cc639db8f 100644 --- a/book/tables/efficacy/rspt01.qmd +++ b/book/tables/efficacy/rspt01.qmd @@ -7,7 +7,7 @@ subtitle: Best Overall Response {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Best Overall Response library(dplyr) library(tern) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adrs <- synthetic_cdisc_dataset("latest", "adrs") +adsl <- random.cdisc.data::cadsl +adrs <- random.cdisc.data::cadrs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -83,8 +81,7 @@ result <- build_table(lyt = lyt_01, df = anl) result ``` -`r webr_code_labels <- c("setup", "pre-processing", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting
Sections to Display @@ -118,8 +115,7 @@ result <- build_table(lyt = lyt_02, df = anl) result ``` -`r webr_code_labels <- c("setup", "pre-processing", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying Analysis Details like Type of
Confidence Interval, Alpha Level, Test Statistic @@ -168,8 +164,7 @@ result <- build_table(lyt = lyt_03, df = anl) result ``` -`r webr_code_labels <- c("setup", "pre-processing", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with
Stratified Analysis @@ -180,6 +175,7 @@ result The stratified analysis section can be added by defining the analyses needed with `control_binary_comparison` for the argument `strat_analysis` and identifying the stratification variables to use. + ```{r variant4, test = list(result_v4 = "result"), opts.label = ifelse(packageVersion("survival") < "3.5-8", "skip_test_strict", "")} strata <- "STRATA1" lyt_04 <- basic_table(show_colcounts = TRUE) %>% @@ -227,8 +223,7 @@ result <- build_table(lyt = lyt_04, df = anl) result ``` -`r webr_code_labels <- c("setup", "pre-processing", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying the Definition
of Overall Response @@ -251,8 +246,7 @@ result <- build_table(lyt = lyt_01, df = anl) result ``` -`r webr_code_labels <- c("setup", "pre-processing", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Defining New
Sections to Display @@ -282,8 +276,7 @@ result <- build_table(lyt = lyt_01, df = anl) result ``` -`r webr_code_labels <- c("setup", "pre-processing", "variant6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "pre-processing", "variant6")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -299,12 +292,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADRS <- synthetic_cdisc_dataset("latest", "adrs") + ADSL <- random.cdisc.data::cadsl + ADRS <- random.cdisc.data::cadrs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -364,5 +355,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/efficacy/ttet01.qmd b/book/tables/efficacy/ttet01.qmd index db9999beda..0d59b0b093 100644 --- a/book/tables/efficacy/ttet01.qmd +++ b/book/tables/efficacy/ttet01.qmd @@ -7,19 +7,17 @@ subtitle: Time-To-Event Summary {{< include ../../_utils/envir_hook.qmd >}} -:::::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adtte <- synthetic_cdisc_dataset("latest", "adtte") +adsl <- random.cdisc.data::cadsl +adtte <- random.cdisc.data::cadtte # Ensure that character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -101,8 +99,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting
Sections to Display @@ -150,8 +147,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying Analysis Details
like Conf. Type, Ties, Alpha Level @@ -225,8 +221,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with
Stratified Analysis @@ -291,8 +286,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying Time Point for
the "XX Months" Analysis @@ -351,8 +345,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Requesting
\> 1 p-value @@ -429,8 +422,7 @@ result <- build_table(lyt, df = adtte_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant6")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant6")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -446,11 +438,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADTTE <- synthetic_cdisc_dataset("latest", "adtte") + + ADSL <- random.cdisc.data::cadsl + ADTTE <- random.cdisc.data::cadtte # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -511,5 +501,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -::::: +::: diff --git a/book/tables/exposure/ext01.qmd b/book/tables/exposure/ext01.qmd index da0f71e625..74643c5ec7 100644 --- a/book/tables/exposure/ext01.qmd +++ b/book/tables/exposure/ext01.qmd @@ -7,20 +7,18 @@ subtitle: Study Drug Exposure Table {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) library(tidyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adex <- synthetic_cdisc_dataset("latest", "adex") +adsl <- random.cdisc.data::cadsl +adex <- random.cdisc.data::cadex # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -100,8 +98,7 @@ result <- build_table(lyt = lyt, df = adex, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Optional Analyses @@ -154,8 +151,7 @@ result <- build_table(lyt = lyt, df = anl, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with User-Specified
Categories for Missed Doses @@ -213,8 +209,7 @@ result <- build_table(lyt = lyt, df = anl, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -230,12 +225,10 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEX <- synthetic_cdisc_dataset("latest", "adex") + ADSL <- random.cdisc.data::cadsl + ADEX <- random.cdisc.data::cadex adex_labels <- unname(col_labels(ADEX)) ADEX <- ADEX %>% filter(PARCAT1 == "OVERALL") %>% @@ -298,5 +291,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt01.qmd b/book/tables/lab-results/lbt01.qmd index b1520b4403..0af53757b2 100644 --- a/book/tables/lab-results/lbt01.qmd +++ b/book/tables/lab-results/lbt01.qmd @@ -7,7 +7,7 @@ subtitle: Laboratory Test Results and Change from Baseline by Visit {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup In order to generate the `LBT01` standard tabulation, the `adlb` dataset may be pre-processed so as to discriminate baseline from follow-up visits. @@ -15,13 +15,11 @@ In order to generate the `LBT01` standard tabulation, the `adlb` dataset may be ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -87,8 +85,7 @@ result <- build_table(lyt, adlb_f) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -99,17 +96,16 @@ result ## {{< fa regular file-lines fa-sm fa-fw >}} Preview + ```{r teal, opts.label = c("skip_if_testing", "app"), eval = packageVersion("teal.modules.clinical") >= "0.9.0.9007"} library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -160,5 +156,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt02.qmd b/book/tables/lab-results/lbt02.qmd index 7a686daaae..68c7555686 100644 --- a/book/tables/lab-results/lbt02.qmd +++ b/book/tables/lab-results/lbt02.qmd @@ -7,19 +7,17 @@ subtitle: Laboratory Test Results by Visit {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show # Preparation of an illustrative dataset -library(scda) -library(scda.2022) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb adlb_labels <- var_labels(adlb) @@ -62,8 +60,7 @@ result <- build_table(l, result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -79,11 +76,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -133,5 +128,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt03.qmd b/book/tables/lab-results/lbt03.qmd index 9339774f1f..1b11ec881f 100644 --- a/book/tables/lab-results/lbt03.qmd +++ b/book/tables/lab-results/lbt03.qmd @@ -7,7 +7,7 @@ subtitle: Laboratory Test Results Change from Baseline by Visit {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup For illustration purposes, this example focuses on "C-Reactive Protein Measurement" starting from baseline, while excluding visit at week 1 for subjects who were randomized to the placebo group. @@ -15,13 +15,11 @@ For illustration purposes, this example focuses on "C-Reactive Protein Measureme ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -73,8 +71,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: In the final step, a new variable is derived from `AVISIT` that can specify the method of estimation of the evaluated change. @@ -117,8 +114,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -136,11 +132,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- df_explicit_na(synthetic_cdisc_dataset("latest", "adsl")) - ADLB <- df_explicit_na(synthetic_cdisc_dataset("latest", "adlb")) %>% + + ADSL <- df_explicit_na(random.cdisc.data::cadsl) + ADLB <- df_explicit_na(random.cdisc.data::cadlb) %>% filter( !(ARM == "B: Placebo" & AVISIT == "WEEK 1 DAY 8"), AVISIT != "SCREENING" @@ -212,5 +206,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt04.qmd b/book/tables/lab-results/lbt04.qmd index ad250b5b3c..0bf6332282 100644 --- a/book/tables/lab-results/lbt04.qmd +++ b/book/tables/lab-results/lbt04.qmd @@ -7,19 +7,17 @@ subtitle: Laboratory Abnormalities Not Present at Baseline {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -58,8 +56,7 @@ result <- build_table(lyt = lyt, df = adlb_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -75,11 +72,8 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") %>% + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb %>% col_relabel(PARAM = "Laboratory Test", ANRIND = "Direction of Abnormality") }) datanames <- c("ADSL", "ADLB") @@ -124,5 +118,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt05.qmd b/book/tables/lab-results/lbt05.qmd index 10938e0654..3b35d124c7 100644 --- a/book/tables/lab-results/lbt05.qmd +++ b/book/tables/lab-results/lbt05.qmd @@ -7,19 +7,17 @@ subtitle: Laboratory Abnormalities with Single and Replicated Marked {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -110,8 +108,7 @@ result <- prune_table(result, keep_rows(has_lbl("Any Abnormality"))) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Showing
All Categories @@ -140,8 +137,7 @@ result <- build_table(lyt, df = adlb_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with
Study-Specific
MLAs @@ -186,12 +182,10 @@ result # this is an a posteriori approach, though. ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt06.qmd b/book/tables/lab-results/lbt06.qmd index 01fc760e42..dde248004a 100644 --- a/book/tables/lab-results/lbt06.qmd +++ b/book/tables/lab-results/lbt06.qmd @@ -7,19 +7,17 @@ subtitle: Laboratory Abnormalities by Visit and Baseline Status {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -66,8 +64,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Standard Table for
Multiple Lab Tests @@ -101,8 +98,7 @@ result <- build_table( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -116,5 +112,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt07.qmd b/book/tables/lab-results/lbt07.qmd index c4a33ebba8..2b20422a1d 100644 --- a/book/tables/lab-results/lbt07.qmd +++ b/book/tables/lab-results/lbt07.qmd @@ -7,20 +7,18 @@ subtitle: Laboratory Test Results with Highest NCI CTCAE Grade Post-Baseline {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) library(forcats) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb adlb_labels <- var_labels(adlb) @@ -107,8 +105,7 @@ result <- result %>% prune_table() result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -124,12 +121,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") %>% + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb %>% filter(!AVISIT %in% c("SCREENING", "BASELINE")) }) datanames <- c("ADSL", "ADLB") @@ -173,5 +169,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt08.qmd b/book/tables/lab-results/lbt08.qmd index cc6168c44e..8c71c1cc25 100644 --- a/book/tables/lab-results/lbt08.qmd +++ b/book/tables/lab-results/lbt08.qmd @@ -7,19 +7,17 @@ subtitle: Laboratory Test Results with Highest NCI CTCAE Grade at Any Time {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb adlb <- adlb %>% mutate( @@ -73,8 +71,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -88,5 +85,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt09.qmd b/book/tables/lab-results/lbt09.qmd index c07f6b10f7..961e55f800 100644 --- a/book/tables/lab-results/lbt09.qmd +++ b/book/tables/lab-results/lbt09.qmd @@ -7,18 +7,16 @@ subtitle: Liver Laboratory Tests -- Patients with Elevated Post-Baseline AST or {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adhy <- synthetic_cdisc_dataset("latest", "adhy") +adhy <- random.cdisc.data::cadhy # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adhy_liver <- df_explicit_na(adhy) @@ -134,8 +132,7 @@ result <- result %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting Sections @@ -175,8 +172,7 @@ result <- result %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -190,5 +186,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt10.qmd b/book/tables/lab-results/lbt10.qmd index e95869e190..ac7cfe3e20 100644 --- a/book/tables/lab-results/lbt10.qmd +++ b/book/tables/lab-results/lbt10.qmd @@ -7,19 +7,17 @@ subtitle: Liver Laboratory Tests -- Patients with Elevated Post-Baseline AST or {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adhy <- synthetic_cdisc_dataset("latest", "adhy") +adsl <- random.cdisc.data::cadsl +adhy <- random.cdisc.data::cadhy adhy_liver <- adhy %>% filter(PARAMCD %in% c( @@ -69,8 +67,7 @@ result <- tbl %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting Sections @@ -100,8 +97,7 @@ result <- tbl2 %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -115,5 +111,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt10_bl.qmd b/book/tables/lab-results/lbt10_bl.qmd index bb10a0451c..9177bf2456 100644 --- a/book/tables/lab-results/lbt10_bl.qmd +++ b/book/tables/lab-results/lbt10_bl.qmd @@ -7,19 +7,17 @@ subtitle: Liver Laboratory Tests -- Patients with Elevated Post-Baseline AST or {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adhy <- synthetic_cdisc_dataset("latest", "adhy") +adsl <- random.cdisc.data::cadsl +adhy <- random.cdisc.data::cadhy adhy_liver <- adhy %>% filter(PARAMCD %in% c( @@ -69,8 +67,7 @@ result <- tbl %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting Sections @@ -100,8 +97,7 @@ result <- tbl2 %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -115,5 +111,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt11.qmd b/book/tables/lab-results/lbt11.qmd index e41ab5fc41..49bca5adc6 100644 --- a/book/tables/lab-results/lbt11.qmd +++ b/book/tables/lab-results/lbt11.qmd @@ -7,19 +7,17 @@ subtitle: Time to First Increase in Liver Laboratory Test Result Meeting Hy's La {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adaette <- synthetic_cdisc_dataset("latest", "adaette") +adsl <- random.cdisc.data::cadsl +adaette <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -84,8 +82,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_safl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Time-To-Event Summary
Selecting Sections to Display @@ -108,8 +105,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_safl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Time-To-Event Summary
with Stratified Analysis @@ -148,8 +144,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_safl) result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -165,12 +160,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAETTE <- synthetic_cdisc_dataset("latest", "adaette") + ADSL <- random.cdisc.data::cadsl + ADAETTE <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -230,5 +224,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt11_bl.qmd b/book/tables/lab-results/lbt11_bl.qmd index 24a0876d0c..5809ed5a9f 100644 --- a/book/tables/lab-results/lbt11_bl.qmd +++ b/book/tables/lab-results/lbt11_bl.qmd @@ -7,19 +7,17 @@ subtitle: Time to First Increase in Liver Laboratory Test Result Meeting Hy's La {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adaette <- synthetic_cdisc_dataset("latest", "adaette") +adsl <- random.cdisc.data::cadsl +adaette <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -84,8 +82,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_safl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Time-To-Event Summary
Selecting Sections to Display @@ -108,8 +105,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_safl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Time-To-Event Summary
with Stratified Analysis @@ -148,8 +144,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_safl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -165,12 +160,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADAETTE <- synthetic_cdisc_dataset("latest", "adaette") + ADSL <- random.cdisc.data::cadsl + ADAETTE <- random.cdisc.data::cadaette # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -230,5 +224,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt12.qmd b/book/tables/lab-results/lbt12.qmd index dd72221bac..bb9db55109 100644 --- a/book/tables/lab-results/lbt12.qmd +++ b/book/tables/lab-results/lbt12.qmd @@ -7,18 +7,16 @@ subtitle: Liver Laboratory Tests by Time on Treatment -- Patients with Elevated {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adhy <- synthetic_cdisc_dataset("latest", "adhy") +adhy <- random.cdisc.data::cadhy anl <- adhy anl$APERIODC <- as.factor(anl$APERIODC) # to ensure the table is built even if there is no patients after filtering @@ -74,8 +72,7 @@ result <- result %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -89,5 +86,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt12_bl.qmd b/book/tables/lab-results/lbt12_bl.qmd index 45ad964c79..3cd3c92c5d 100644 --- a/book/tables/lab-results/lbt12_bl.qmd +++ b/book/tables/lab-results/lbt12_bl.qmd @@ -7,18 +7,16 @@ subtitle: Liver Laboratory Tests by Time on Treatment -- Patients with Elevated {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adhy <- synthetic_cdisc_dataset("latest", "adhy") +adhy <- random.cdisc.data::cadhy anl <- adhy anl$APERIODC <- as.factor(anl$APERIODC) # to ensure the table is built even if there is no patients after filtering @@ -74,8 +72,7 @@ result <- result %>% trim_rows(criteria = criteria_fun) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -89,5 +86,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt13.qmd b/book/tables/lab-results/lbt13.qmd index e6e6a549e3..389c6561c7 100644 --- a/book/tables/lab-results/lbt13.qmd +++ b/book/tables/lab-results/lbt13.qmd @@ -7,7 +7,7 @@ subtitle: NCI CTCAE Grade Laboratory Abnormalities by Visit and Baseline Grade {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup Please note that for each variant, the `adlb` dataset needs to be filtered on correct flags like `WGRLOVFL`, `WGRHIVFL`, et al., otherwise the layout function will not return the correct counts. @@ -18,13 +18,11 @@ Otherwise please follow the pre-processing steps below before applying the layou ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb adsl <- df_explicit_na(adsl) adlb <- df_explicit_na(adlb) @@ -114,8 +112,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Standard Table (High) @@ -197,8 +194,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Without Patients with
Missing Baseline (Low) @@ -279,8 +275,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Missing Baseline
Considered as Grade 0 (High) @@ -360,8 +355,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Fill-In
of Grades (High) @@ -444,8 +438,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -461,11 +454,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb }) datanames <- c("ADSL", "ADLB") datanames(data) <- datanames @@ -521,5 +512,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt14.qmd b/book/tables/lab-results/lbt14.qmd index d9c6c7b8ff..c1c8de0bd5 100644 --- a/book/tables/lab-results/lbt14.qmd +++ b/book/tables/lab-results/lbt14.qmd @@ -7,7 +7,7 @@ subtitle: Laboratory Test Results Shift Table -- Highest NCI CTCAE Grade Post-Ba {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup Please note that for each variant, the `adlb` dataset needs to be filtered on correct flags like `WGRLOFL`, `WGRHIFL`, et al., otherwise the layout function will not return the correct counts. @@ -18,13 +18,11 @@ Otherwise please follow the pre-processing steps below before applying the layou ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb adsl <- df_explicit_na(adsl) adlb <- df_explicit_na(adlb) @@ -95,8 +93,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Standard Table (Low) @@ -159,8 +156,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Without Patients with
Missing Baseline (High) @@ -222,8 +218,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Missing Baseline
Considered as Grade 0 (Low) @@ -284,8 +279,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Fill-In of Grades @@ -346,8 +340,7 @@ result <- basic_table(show_colcounts = TRUE) %>% result ``` -`r webr_code_labels <- c("setup", "variant5")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant5")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -363,11 +356,9 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) - - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") + + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb }) datanames <- c("ADSL", "ADLB") datanames(data) <- datanames @@ -423,5 +414,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/lab-results/lbt15.qmd b/book/tables/lab-results/lbt15.qmd index a78095b34e..cf4ecb3501 100644 --- a/book/tables/lab-results/lbt15.qmd +++ b/book/tables/lab-results/lbt15.qmd @@ -7,22 +7,20 @@ subtitle: Laboratory Test Shifts to NCI CTCAE Grade 3-4 Post-Baseline {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup -Because the `scda` dataset `adlb` doesn't have the `PARCAT1` variable, this variable is created from `LBCAT` in pre-processing. +Because the `random.cdisc.data` dataset `adlb` doesn't have the `PARCAT1` variable, this variable is created from `LBCAT` in pre-processing. ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(tern) library(dplyr) library(forcats) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adlb <- synthetic_cdisc_dataset("latest", "adlb") +adsl <- random.cdisc.data::cadsl +adlb <- random.cdisc.data::cadlb adlb <- adlb %>% mutate( @@ -102,8 +100,7 @@ result <- build_table(lyt, adlb, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying Cut Point @@ -116,8 +113,7 @@ result <- build_table(lyt, adlb_alt_cut, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -135,13 +131,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) library(forcats) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADLB <- synthetic_cdisc_dataset("latest", "adlb") %>% + ADSL <- random.cdisc.data::cadsl + ADLB <- random.cdisc.data::cadlb %>% mutate( ANRIND = fct_collapse(ATOXGR, "LOW" = c("-3", "-4"), @@ -204,5 +198,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/medical-history/mht01.qmd b/book/tables/medical-history/mht01.qmd index 9451aae426..a15e317665 100644 --- a/book/tables/medical-history/mht01.qmd +++ b/book/tables/medical-history/mht01.qmd @@ -7,7 +7,7 @@ subtitle: Medical History {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Medical History library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -admh <- synthetic_cdisc_dataset("latest", "admh") +adsl <- random.cdisc.data::cadsl +admh <- random.cdisc.data::cadmh # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -73,8 +71,7 @@ result <- build_table(lyt, admh_f, alt_counts_df = adsl_f) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table of History
Prior to Study @@ -92,8 +89,7 @@ result <- build_table(lyt, admh_f_prior, alt_counts_df = adsl_f) %>% result ``` -`r webr_code_labels <- c("setup", "variant1", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Total Number
of Conditions Suppressed @@ -132,8 +128,7 @@ result <- build_table(lyt, admh_f, alt_counts_df = adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Total Number of Conditions Per Body
System After The Summary of Patients @@ -185,8 +180,7 @@ result <- build_table(lyt, admh_f, alt_counts_df = adsl_f) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -202,13 +196,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") %>% + ADSL <- random.cdisc.data::cadsl %>% filter(SAFFL == "Y") - ADMH <- synthetic_cdisc_dataset("latest", "admh") %>% + ADMH <- random.cdisc.data::cadmh %>% filter(SAFFL == "Y" & MHBODSYS != "" & MHDECOD != "") }) datanames <- c("ADSL", "ADMH") @@ -247,5 +239,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkct01.qmd b/book/tables/pharmacokinetic/pkct01.qmd index 5e8ed8a624..6cc6d0c908 100644 --- a/book/tables/pharmacokinetic/pkct01.qmd +++ b/book/tables/pharmacokinetic/pkct01.qmd @@ -7,20 +7,18 @@ subtitle: Summary Concentration Table {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") %>% +adsl <- random.cdisc.data::cadsl %>% filter(ACTARM == "A: Drug X") -adpc <- synthetic_cdisc_dataset("latest", "adpc") %>% +adpc <- random.cdisc.data::cadpc %>% filter(ACTARM == "A: Drug X", PARAM == "Plasma Drug X") # Setting up the data @@ -97,8 +95,7 @@ main_footer(result) <- "NE: Not Estimable" result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Implementing 1/3 Imputation Rule @@ -137,8 +134,7 @@ main_footer(result) <- c("NE: Not Estimable", "ND: Not Derived") result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Implementing 1/2 Imputation Rule @@ -177,8 +173,7 @@ main_footer(result) <- "ND: Not Derived" result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -192,5 +187,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt02.qmd b/book/tables/pharmacokinetic/pkpt02.qmd index ea6df8e170..f74479cef4 100644 --- a/book/tables/pharmacokinetic/pkpt02.qmd +++ b/book/tables/pharmacokinetic/pkpt02.qmd @@ -7,18 +7,16 @@ subtitle: Pharmacokinetic Parameter Summary -- Plasma/Serum/Blood PK Parameters {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp <- adpp %>% filter(PPSPEC == "Plasma", AVISIT == "CYCLE 1 DAY 1") ``` @@ -58,6 +56,7 @@ lyt <- basic_table() %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp0 <- adpp %>% filter(PPCAT == "Plasma Drug X") %>% @@ -71,8 +70,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: #### Plasma Drug Y @@ -81,6 +79,7 @@ result ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant2, test = list(result_v2 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp1 <- adpp %>% filter(PPCAT == "Plasma Drug Y") %>% @@ -94,8 +93,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp1$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -109,4 +107,4 @@ result ``` {{< include ../../repro.qmd >}} -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt03.qmd b/book/tables/pharmacokinetic/pkpt03.qmd index 9fde0c177c..29afbb02aa 100644 --- a/book/tables/pharmacokinetic/pkpt03.qmd +++ b/book/tables/pharmacokinetic/pkpt03.qmd @@ -7,20 +7,19 @@ subtitle: Pharmacokinetic Parameter Summary of Plasma by Treatment (Stats in Col {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup + ```{r setup, message = FALSE, opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) # Preprocess analysis data ---- -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp <- adpp %>% filter(PPSPEC == "Plasma") %>% filter(AVISIT %in% c("CYCLE 1 DAY 1", "CYCLE 1 DAY 2")) %>% @@ -29,7 +28,7 @@ adpp <- adpp %>% mutate(PARAM = reorder(PARAM, TLG_ORDER)) # Preprocess subject-level data ---- -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl # Workaround needed to include (N=xx) population counts # Repeat ADSL by the number of levels in AVISIT @@ -143,8 +142,7 @@ result <- paginate_table(result, landscape = TRUE) result ``` -`r webr_code_labels <- c("setup", "lyt", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: #### Plasma Drug X: Remove Rows with 0s @@ -162,8 +160,7 @@ result <- paginate_table(result, landscape = TRUE) result ``` -`r webr_code_labels <- c("setup", "lyt", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: #### Plasma Drug Y @@ -179,8 +176,7 @@ result <- paginate_table(result, landscape = TRUE) result ``` -`r webr_code_labels <- c("setup", "lyt", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -194,5 +190,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt04.qmd b/book/tables/pharmacokinetic/pkpt04.qmd index 91a7b483e2..09d58fddd5 100644 --- a/book/tables/pharmacokinetic/pkpt04.qmd +++ b/book/tables/pharmacokinetic/pkpt04.qmd @@ -7,18 +7,16 @@ subtitle: Pharmacokinetic Parameter Summary -- Urine PK Parameters (Stats in Row {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp <- adpp %>% filter(PPSPEC == "Urine", AVISIT == "CYCLE 1 DAY 1") ``` @@ -58,6 +56,7 @@ lyt <- basic_table() %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp0 <- adpp %>% filter(PPCAT == "Plasma Drug X") %>% @@ -71,8 +70,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: #### Plasma Drug Y @@ -81,6 +79,7 @@ result ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant2, test = list(result_v2 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp1 <- adpp %>% filter(PPCAT == "Plasma Drug Y") %>% @@ -94,8 +93,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp1$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -109,5 +107,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt05.qmd b/book/tables/pharmacokinetic/pkpt05.qmd index 767e293f29..569227bd47 100644 --- a/book/tables/pharmacokinetic/pkpt05.qmd +++ b/book/tables/pharmacokinetic/pkpt05.qmd @@ -7,18 +7,16 @@ subtitle: Summary of Urinary PK Parameters by Treatment Arm (Stats in Columns) {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp <- adpp %>% filter(PPSPEC == "Urine", AVISIT == "CYCLE 1 DAY 1") ``` @@ -77,6 +75,7 @@ lyt <- basic_table() %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp0 <- adpp %>% filter(PPCAT == "Plasma Drug X") %>% @@ -90,8 +89,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: #### Plasma Drug Y @@ -100,6 +98,7 @@ result ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant2, test = list(result_v2 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp1 <- adpp %>% filter(PPCAT == "Plasma Drug Y") %>% @@ -113,8 +112,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp1$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -128,5 +126,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt06.qmd b/book/tables/pharmacokinetic/pkpt06.qmd index d970631d9f..a912e1afe3 100644 --- a/book/tables/pharmacokinetic/pkpt06.qmd +++ b/book/tables/pharmacokinetic/pkpt06.qmd @@ -7,19 +7,17 @@ subtitle: Pharmacokinetic Parameter Summary -- Dose-Normalized PK Parameters (St {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) library(stringr) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp <- adpp %>% filter(AVISIT == "CYCLE 1 DAY 1", str_detect(tolower(PARAM), regex("norm by dose", ignore_case = TRUE))) ``` @@ -60,6 +58,7 @@ lyt <- basic_table() %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp0 <- adpp %>% filter(PPCAT == "Plasma Drug X") %>% @@ -73,8 +72,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: #### Plasma Drug Y @@ -83,6 +81,7 @@ result ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant2, test = list(result_v2 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp1 <- adpp %>% filter(PPCAT == "Plasma Drug Y") %>% @@ -96,8 +95,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp1$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -111,5 +109,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt07.qmd b/book/tables/pharmacokinetic/pkpt07.qmd index 908d18ea64..11443be27e 100644 --- a/book/tables/pharmacokinetic/pkpt07.qmd +++ b/book/tables/pharmacokinetic/pkpt07.qmd @@ -7,19 +7,17 @@ subtitle: Table of Mean Dose-Normalized Selected Pharmacokinetic Parameters (Sta {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) library(stringr) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp <- adpp %>% filter(AVISIT == "CYCLE 1 DAY 1", str_detect(tolower(PARAM), regex("norm by dose", ignore_case = TRUE))) ``` @@ -79,6 +77,7 @@ lyt <- basic_table() %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp0 <- adpp %>% filter(PPCAT == "Plasma Drug X") %>% @@ -92,8 +91,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: #### Plasma Drug Y @@ -102,6 +100,7 @@ result ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant2, test = list(result_v2 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} adpp1 <- adpp %>% filter(PPCAT == "Plasma Drug Y") %>% @@ -115,8 +114,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp1$PPCAT), "\nVisit:", unique(a result ``` -`r webr_code_labels <- c("setup", "lyt", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "lyt", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -130,5 +128,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt08.qmd b/book/tables/pharmacokinetic/pkpt08.qmd index 9e73b5067a..b6fe95f0bd 100644 --- a/book/tables/pharmacokinetic/pkpt08.qmd +++ b/book/tables/pharmacokinetic/pkpt08.qmd @@ -7,18 +7,16 @@ subtitle: Pharmacokinetic Parameter Summary of Cumulative Amount of Drug Elimina {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(dplyr) -library(scda) -library(scda.2022) library(tern) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp adpp <- adpp %>% filter(PPSTINT != "NA" & PPENINT != "NA") %>% @@ -31,6 +29,7 @@ adpp <- adpp %>% ## {{< fa regular file-lines sm fw >}} Preview + ```{r variant1, test = list(result_v1 = "result"), opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} # create layout lyt <- basic_table() %>% @@ -90,8 +89,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(a cat(rtables::toString(result, indent_size = 10)) ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -105,5 +103,4 @@ cat(rtables::toString(result, indent_size = 10)) ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/pharmacokinetic/pkpt11.qmd b/book/tables/pharmacokinetic/pkpt11.qmd index f45e262449..f4b3e19b06 100644 --- a/book/tables/pharmacokinetic/pkpt11.qmd +++ b/book/tables/pharmacokinetic/pkpt11.qmd @@ -7,19 +7,18 @@ subtitle: Pharmacokinetic Parameter Estimated Ratios of Geometric Means and 90% {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup + ```{r setup, message = FALSE, opts.label = ifelse(packageVersion("tern") < "0.9.3.9020", "skip_test_strict", "")} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adpp <- synthetic_cdisc_dataset("latest", "adpp") +adpp <- random.cdisc.data::cadpp # Comparator Dose - A: Drug X arm_var <- "TRT01A" @@ -163,8 +162,7 @@ subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT)) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -178,5 +176,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/risk-management-plan/rmpt01.qmd b/book/tables/risk-management-plan/rmpt01.qmd index 1fcd7fcb94..be470e0714 100644 --- a/book/tables/risk-management-plan/rmpt01.qmd +++ b/book/tables/risk-management-plan/rmpt01.qmd @@ -7,25 +7,23 @@ subtitle: Duration of Exposure for Risk Management Plan {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adex <- synthetic_cdisc_dataset("latest", "adex") +adsl <- random.cdisc.data::cadsl +adex <- random.cdisc.data::cadex # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) adex <- df_explicit_na(adex) -# Simulate ADEX records with PARAMCD == "TDURD" as they are not in sample scda dataset. +# Simulate ADEX records with PARAMCD == "TDURD" as they are not in sample random.cdisc.data dataset. set.seed(1, kind = "Mersenne-Twister") adex2 <- adex %>% distinct(USUBJID, .keep_all = TRUE) %>% @@ -82,8 +80,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_f) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -99,12 +96,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEX <- synthetic_cdisc_dataset("latest", "adex") + ADSL <- random.cdisc.data::cadsl + ADEX <- random.cdisc.data::cadex labels <- col_labels(ADEX) set.seed(1, kind = "Mersenne-Twister") @@ -173,5 +169,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/risk-management-plan/rmpt03.qmd b/book/tables/risk-management-plan/rmpt03.qmd index dea5539d88..203af904f1 100644 --- a/book/tables/risk-management-plan/rmpt03.qmd +++ b/book/tables/risk-management-plan/rmpt03.qmd @@ -7,25 +7,23 @@ subtitle: Extent of Exposure by Age Group and Gender for Risk Management Plan {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adex <- synthetic_cdisc_dataset("latest", "adex") +adsl <- random.cdisc.data::cadsl +adex <- random.cdisc.data::cadex # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) adex <- df_explicit_na(adex) -# Simulate ADEX records with PARAMCD == "TDURD" as they are not in sample scda dataset. +# Simulate ADEX records with PARAMCD == "TDURD" as they are not in sample random.cdisc.data dataset. set.seed(1, kind = "Mersenne-Twister") adex2 <- adex %>% distinct(USUBJID, .keep_all = TRUE) %>% @@ -91,8 +89,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_f) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Excluding Empty Age Groups @@ -122,8 +119,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_f) %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -139,12 +135,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEX <- synthetic_cdisc_dataset("latest", "adex") + ADSL <- random.cdisc.data::cadsl + ADEX <- random.cdisc.data::cadex labels <- col_labels(ADEX) set.seed(1, kind = "Mersenne-Twister") @@ -226,5 +221,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/risk-management-plan/rmpt04.qmd b/book/tables/risk-management-plan/rmpt04.qmd index eb24a9851d..331ec36373 100644 --- a/book/tables/risk-management-plan/rmpt04.qmd +++ b/book/tables/risk-management-plan/rmpt04.qmd @@ -7,25 +7,23 @@ subtitle: Extent of Exposure by Ethnic Origin for Risk Management Plan {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adex <- synthetic_cdisc_dataset("latest", "adex") +adsl <- random.cdisc.data::cadsl +adex <- random.cdisc.data::cadex # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) adex <- df_explicit_na(adex) -# Simulate ADEX records with PARAMCD == "TDURD" as they are not in sample scda dataset. +# Simulate ADEX records with PARAMCD == "TDURD" as they are not in sample random.cdisc.data dataset. set.seed(1, kind = "Mersenne-Twister") adex2 <- adex %>% distinct(USUBJID, .keep_all = TRUE) %>% @@ -71,8 +69,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_f) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -88,12 +85,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEX <- synthetic_cdisc_dataset("latest", "adex") + ADSL <- random.cdisc.data::cadsl + ADEX <- random.cdisc.data::cadex labels <- col_labels(ADEX) set.seed(1, kind = "Mersenne-Twister") @@ -154,5 +150,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/risk-management-plan/rmpt05.qmd b/book/tables/risk-management-plan/rmpt05.qmd index 1774e556cf..efec9550b5 100644 --- a/book/tables/risk-management-plan/rmpt05.qmd +++ b/book/tables/risk-management-plan/rmpt05.qmd @@ -7,19 +7,17 @@ subtitle: Extent of Exposure by Race for Risk Management Plan {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adex <- synthetic_cdisc_dataset("latest", "adex") +adsl <- random.cdisc.data::cadsl +adex <- random.cdisc.data::cadex # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -73,8 +71,7 @@ result <- build_table(lyt, df = anl, alt_counts_df = adsl_f) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -90,12 +87,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADEX <- synthetic_cdisc_dataset("latest", "adex") + ADSL <- random.cdisc.data::cadsl + ADEX <- random.cdisc.data::cadex labels <- col_labels(ADEX) set.seed(1, kind = "Mersenne-Twister") @@ -156,5 +152,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/risk-management-plan/rmpt06.qmd b/book/tables/risk-management-plan/rmpt06.qmd index eb9dc3a08a..1bc61d4e1c 100644 --- a/book/tables/risk-management-plan/rmpt06.qmd +++ b/book/tables/risk-management-plan/rmpt06.qmd @@ -7,7 +7,7 @@ subtitle: Seriousness, Outcomes, Severity, Frequency with 95% CI for Risk Manage {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup The `adae` and `adsl` datasets need to undergo data processing before table production. @@ -18,11 +18,9 @@ Some new variables are added to these datasets to create the desired tables. library(tern) library(dplyr) -library(scda) -library(scda.2022) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -adae <- synthetic_cdisc_dataset("latest", "adae") +adsl <- random.cdisc.data::cadsl +adae <- random.cdisc.data::cadae # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -131,8 +129,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Selecting
Sections to Display @@ -188,8 +185,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## Table with Differences @@ -261,8 +257,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## Table Modifying Alpha Level and
Type of Confidence Interval @@ -337,8 +332,7 @@ result <- rbind( result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: ## Table by SMQ @@ -360,5 +354,4 @@ result ``` {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/safety/enrollment01.qmd b/book/tables/safety/enrollment01.qmd index ae2200d10d..922c2e66b6 100644 --- a/book/tables/safety/enrollment01.qmd +++ b/book/tables/safety/enrollment01.qmd @@ -7,7 +7,7 @@ subtitle: Enrollment Variants {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} @@ -15,11 +15,9 @@ subtitle: Enrollment Variants library(dplyr) library(forcats) -library(scda) -library(scda.2022) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") +adsl <- random.cdisc.data::cadsl # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -70,8 +68,7 @@ result <- build_table(lyt, adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## ENT01A -- Enrollment by Country
and Investigator Number @@ -94,8 +91,7 @@ result <- build_table(lyt, adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: ## ENT02 -- Enrollment by Region, Country,
and Investigator Number/Name @@ -120,8 +116,7 @@ result <- build_table(lyt, adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant3")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant3")` {{< include ../../_utils/webr.qmd >}} ::: ## ENT02A -- Enrollment by Country
and Investigator Number/Name @@ -144,8 +139,7 @@ result <- build_table(lyt, adsl) %>% result ``` -`r webr_code_labels <- c("setup", "variant4")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant4")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -159,17 +153,17 @@ Note that for this module application, only the variables passed into `by_vars` Variables passed into `analyze_vars` are additionally used when `row_groups` is deselected. + ```{r teal, opts.label = c("skip_if_testing", "app"), eval = packageVersion("teal.modules.clinical") >= "0.9.0.9003"} library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") + ADSL <- random.cdisc.data::cadsl # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. ADSL <- df_explicit_na(ADSL) @@ -236,5 +230,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/vital-signs/vst01.qmd b/book/tables/vital-signs/vst01.qmd index b795a7c048..d616072e57 100644 --- a/book/tables/vital-signs/vst01.qmd +++ b/book/tables/vital-signs/vst01.qmd @@ -7,19 +7,17 @@ subtitle: Vital Sign Results and Change from Baseline by Visit {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show library(tern) -library(scda) -library(scda.2022) library(dplyr) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -advs <- synthetic_cdisc_dataset("latest", "advs") +adsl <- random.cdisc.data::cadsl +advs <- random.cdisc.data::cadvs # Ensure character variables are converted to factors and empty strings and NAs are explicit missing levels. adsl <- df_explicit_na(adsl) @@ -124,8 +122,7 @@ result <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -136,18 +133,18 @@ result ## {{< fa regular file-lines fa-sm fa-fw >}} Preview + ```{r teal, opts.label = c("skip_if_testing", "app"), eval = packageVersion("teal.modules.clinical") >= "0.9.0.9007"} library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADVS <- synthetic_cdisc_dataset("latest", "advs") + ADSL <- random.cdisc.data::cadsl + ADVS <- random.cdisc.data::cadvs advs_label <- col_labels(ADVS) # post-baseline @@ -233,5 +230,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/book/tables/vital-signs/vst02.qmd b/book/tables/vital-signs/vst02.qmd index 192f8639ad..ba6264dd8c 100644 --- a/book/tables/vital-signs/vst02.qmd +++ b/book/tables/vital-signs/vst02.qmd @@ -7,19 +7,17 @@ subtitle: Vital Sign Abnormalities {{< include ../../_utils/envir_hook.qmd >}} -:::: {.panel-tabset} +::: panel-tabset ## Data Setup ```{r setup, message = FALSE} #| code-fold: show -library(scda) -library(scda.2022) library(dplyr) library(tern) -adsl <- synthetic_cdisc_dataset("latest", "adsl") -advs <- synthetic_cdisc_dataset("latest", "advs") +adsl <- random.cdisc.data::cadsl +advs <- random.cdisc.data::cadvs # Ensure character variables are converted to factors and empty strings # and NAs are explicit missing levels. @@ -59,8 +57,7 @@ result <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant1")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant1")` {{< include ../../_utils/webr.qmd >}} ::: ## VST02_2 -- Table of Abnormalities Among
Subjects Without Abnormality at Baseline @@ -85,8 +82,7 @@ result <- build_table(lyt = lyt, df = advs_f, alt_counts_df = adsl) result ``` -`r webr_code_labels <- c("setup", "variant2")` -{{< include ../../_utils/webr.qmd >}} +`r webr_code_labels <- c("setup", "variant2")` {{< include ../../_utils/webr.qmd >}} ::: {{< include ../../_utils/save_results.qmd >}} @@ -102,12 +98,11 @@ library(teal.modules.clinical) ## Data reproducible code data <- teal_data() data <- within(data, { - library(scda) - library(scda.2022) + library(dplyr) - ADSL <- synthetic_cdisc_dataset("latest", "adsl") - ADVS <- synthetic_cdisc_dataset("latest", "advs") %>% + ADSL <- random.cdisc.data::cadsl + ADVS <- random.cdisc.data::cadvs %>% mutate(ONTRTFL = ifelse(AVISIT %in% c("SCREENING", "BASELINE"), "", "Y")) %>% col_relabel(ONTRTFL = "On Treatment Record Flag") }) @@ -153,5 +148,4 @@ shinyApp(app$ui, app$server) ::: {{< include ../../repro.qmd >}} - -:::: +::: diff --git a/package/DESCRIPTION b/package/DESCRIPTION index 78ec1c9aaa..d4b65e3c56 100644 --- a/package/DESCRIPTION +++ b/package/DESCRIPTION @@ -25,12 +25,11 @@ Suggests: lubridate, nestcolor, quarto (>= 1.4), + random.cdisc.data, renv, rlistings, rtables, scales, - scda, - scda.2022, shinylive, stats, stringr, diff --git a/package/staged_dependencies.yaml b/package/staged_dependencies.yaml index c53a486c91..94afeff34c 100644 --- a/package/staged_dependencies.yaml +++ b/package/staged_dependencies.yaml @@ -4,11 +4,8 @@ current_repo: host: https://github.com subdir: package upstream_repos: - insightsengineering/scda: - repo: insightsengineering/scda - host: https://github.com - insightsengineering/scda.2022: - repo: insightsengineering/scda.2022 + insightsengineering/random.cdisc.data: + repo: insightsengineering/random.cdisc.data host: https://github.com insightsengineering/teal.modules.clinical: repo: insightsengineering/teal.modules.clinical