library(scda)library(scda.2022)library(dplyr)library(tern)# Preprocess analysis data ----adpp <-synthetic_cdisc_dataset("latest", "adpp")adpp <- adpp %>%filter(PPSPEC =="Plasma") %>%filter(AVISIT %in%c("CYCLE 1 DAY 1", "CYCLE 1 DAY 2")) %>%h_pkparam_sort() %>%mutate(PARAM =factor(paste0(TLG_DISPLAY, " (", AVALU, ")"))) %>%mutate(PARAM =reorder(PARAM, TLG_ORDER))# Preprocess subject-level data ----adsl <-synthetic_cdisc_dataset("latest", "adsl")# Workaround needed to include (N=xx) population counts# Repeat ADSL by the number of levels in AVISIT# Include AVISIT and dummy PARAM as it's needed for trim_levels_in_groupadsl_tmp <- adsl %>%select(STUDYID, USUBJID, ARMCD) %>%unique() %>%mutate(PARAM =factor(NA_character_, levels =levels(adpp$PARAM)))# Data for Plasma Drug X example ----adpp_x <- adpp %>%filter(PPCAT =="Plasma Drug X") %>%# Please do not replicate mutate statement below!# It is used to make the random data in this example more realistic# as not all parameters are always available across all visits.mutate(AVAL =if_else( ARMCD =="ARM A"& AVISIT =="CYCLE 1 DAY 1"& PARAM =="Cmax (ug/mL)",NA_real_, AVAL ) )adpp_x_tmp <- adpp_x %>%select(STUDYID, USUBJID, ARMCD, AVISIT) %>%unique()adsl_x_splitvars <- adsl_tmp %>%left_join(adpp_x_tmp, by =c("STUDYID", "USUBJID", "ARMCD")) %>%filter(!is.na(AVISIT))# Data for Plasma Drug Y example ----adpp_y <- adpp %>%filter(PPCAT =="Plasma Drug Y")adpp_y_tmp <- adpp_y %>%select(STUDYID, USUBJID, ARMCD, AVISIT) %>%unique()adsl_y_splitvars <- adsl_tmp %>%left_join(adpp_y_tmp, by =c("STUDYID", "USUBJID", "ARMCD")) %>%filter(!is.na(AVISIT))
$`CYCLE 1 DAY 1`
Summary of Plasma PK Parameter by Treatment Arm, PK Population
Analyte: Plasma Drug X
Visit: CYCLE 1 DAY 1
--------------------------------------------------------------------------------------------------------------------------
Treatment Arm
PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum
--------------------------------------------------------------------------------------------------------------------------
ARM A (N=134)
Cmax (ug/mL) 0 NE NE NE NE NE NE NE NE
AUCinf obs (day*ug/mL) 134 203 37.7 18.6 199 18.7 197 125 311
CL obs (ml/day/kg) 134 5.04 1.04 20.6 4.93 22.4 5.08 2.25 7.39
ARM C (N=132)
Cmax (ug/mL) 132 30.0 5.46 18.2 29.5 18.9 29.8 15.9 47.6
AUCinf obs (day*ug/mL) 132 195 37.8 19.4 192 20.1 196 103 315
CL obs (ml/day/kg) 132 5.01 0.985 19.7 4.91 21.1 4.97 2.10 7.49
$`CYCLE 1 DAY 2`
Summary of Plasma PK Parameter by Treatment Arm, PK Population
Analyte: Plasma Drug X
Visit: CYCLE 1 DAY 2
-------------------------------------------------------------------------------------------------------------------------
Treatment Arm
PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum
-------------------------------------------------------------------------------------------------------------------------
ARM A (N=134)
Cmax (ug/mL) 134 29.4 6.22 21.2 28.6 24.4 29.8 10.1 43.5
AUCinf obs (day*ug/mL) 134 202 41.2 20.4 197 21.4 200 105 294
CL obs (ml/day/kg) 134 5.04 1.04 20.7 4.92 22.6 5.01 2.39 7.18
ARM C (N=132)
Cmax (ug/mL) 132 30.4 6.03 19.9 29.7 21.7 30.5 12.4 45.5
AUCinf obs (day*ug/mL) 132 191 43.0 22.5 186 24.7 189 74.8 296
CL obs (ml/day/kg) 132 5.07 1.07 21.1 4.96 22.4 5.01 2.48 7.50
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Altenatively, copy the code and click here to open WebR in a new tab.
$`CYCLE 1 DAY 1`
Summary of Plasma PK Parameter by Treatment Arm, PK Population
Analyte: Plasma Drug X
Visit: CYCLE 1 DAY 1
--------------------------------------------------------------------------------------------------------------------------
Treatment Arm
PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum
--------------------------------------------------------------------------------------------------------------------------
ARM A (N=134)
AUCinf obs (day*ug/mL) 134 203 37.7 18.6 199 18.7 197 125 311
CL obs (ml/day/kg) 134 5.04 1.04 20.6 4.93 22.4 5.08 2.25 7.39
ARM C (N=132)
Cmax (ug/mL) 132 30.0 5.46 18.2 29.5 18.9 29.8 15.9 47.6
AUCinf obs (day*ug/mL) 132 195 37.8 19.4 192 20.1 196 103 315
CL obs (ml/day/kg) 132 5.01 0.985 19.7 4.91 21.1 4.97 2.10 7.49
$`CYCLE 1 DAY 2`
Summary of Plasma PK Parameter by Treatment Arm, PK Population
Analyte: Plasma Drug X
Visit: CYCLE 1 DAY 2
-------------------------------------------------------------------------------------------------------------------------
Treatment Arm
PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum
-------------------------------------------------------------------------------------------------------------------------
ARM A (N=134)
Cmax (ug/mL) 134 29.4 6.22 21.2 28.6 24.4 29.8 10.1 43.5
AUCinf obs (day*ug/mL) 134 202 41.2 20.4 197 21.4 200 105 294
CL obs (ml/day/kg) 134 5.04 1.04 20.7 4.92 22.6 5.01 2.39 7.18
ARM C (N=132)
Cmax (ug/mL) 132 30.4 6.03 19.9 29.7 21.7 30.5 12.4 45.5
AUCinf obs (day*ug/mL) 132 191 43.0 22.5 186 24.7 189 74.8 296
CL obs (ml/day/kg) 132 5.07 1.07 21.1 4.96 22.4 5.01 2.48 7.50
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Altenatively, copy the code and click here to open WebR in a new tab.
$`CYCLE 1 DAY 1`
Summary of Plasma PK Parameter by Treatment Arm, PK Population
Analyte: Plasma Drug Y
Visit: CYCLE 1 DAY 1
--------------------------------------------------------------------------------------------------------------------------
Treatment Arm
PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum
--------------------------------------------------------------------------------------------------------------------------
ARM C (N=132)
Cmax (ug/mL) 132 29.9 5.55 18.6 29.4 20.1 29.7 14.1 43.4
AUCinf obs (day*ug/mL) 132 199 37.9 19.1 195 18.9 195 126 318
CL obs (ml/day/kg) 132 4.96 0.895 18.1 4.87 18.7 4.94 2.99 7.21
$`CYCLE 1 DAY 2`
Summary of Plasma PK Parameter by Treatment Arm, PK Population
Analyte: Plasma Drug Y
Visit: CYCLE 1 DAY 2
--------------------------------------------------------------------------------------------------------------------------
Treatment Arm
PK Parameter n Mean SD CV (%) Geometric Mean CV % Geometric Mean Median Minimum Maximum
--------------------------------------------------------------------------------------------------------------------------
ARM C (N=132)
Cmax (ug/mL) 132 30.7 6.12 19.9 30.1 21.9 31.4 12.9 48.3
AUCinf obs (day*ug/mL) 132 199 40.0 20.1 194 22.2 197 79.2 295
CL obs (ml/day/kg) 132 4.99 0.984 19.7 4.89 20.9 4.96 2.58 8.39
Experimental use!
WebR is a tool allowing you to run R code in the web browser. Modify the code below and click run to see the results. Altenatively, copy the code and click here to open WebR in a new tab.
Code
# In progress
Timestamp
Code
Sys.time()
[1] "2024-05-11 17:32:41 UTC"
Session Info
Code
sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.4 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
locale:
[1] C
time zone: Etc/UTC
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tern_0.9.4 rtables_0.6.7 magrittr_2.0.3 formatters_0.5.6
[5] dplyr_1.1.4 scda.2022_0.1.5 scda_0.1.6
loaded via a namespace (and not attached):
[1] Matrix_1.7-0 gtable_0.3.5 jsonlite_1.8.8 compiler_4.4.0
[5] brio_1.1.5 tidyselect_1.2.1 tidyr_1.3.1 splines_4.4.0
[9] scales_1.3.0 yaml_2.3.8 fastmap_1.1.1 lattice_0.22-6
[13] ggplot2_3.5.1 R6_2.5.1 generics_0.1.3 knitr_1.46
[17] rbibutils_2.2.16 htmlwidgets_1.6.4 backports_1.4.1 checkmate_2.3.1
[21] tibble_3.2.1 munsell_0.5.1 pillar_1.9.0 rlang_1.1.3
[25] utf8_1.2.4 testthat_3.2.1.1 stringi_1.8.4 broom_1.0.5
[29] xfun_0.43 cli_3.6.2 withr_3.0.0 Rdpack_2.6
[33] digest_0.6.35 grid_4.4.0 lifecycle_1.0.4 vctrs_0.6.5
[37] evaluate_0.23 glue_1.7.0 codetools_0.2-20 survival_3.6-4
[41] colorspace_2.1-0 fansi_1.0.6 purrr_1.0.2 rmarkdown_2.26
[45] tools_4.4.0 pkgconfig_2.0.3 htmltools_0.5.8.1
.lock file
Download the .lock file and use renv::restore() on it to recreate environment used to generate this website.