PKPT05
Summary of Urinary PK Parameters by Treatment Arm (Stats in Columns)
Code
# lyt creation
lyt <- basic_table() %>%
split_rows_by(
var = "ARMCD",
split_fun = trim_levels_in_group("ARMCD"),
label_pos = "topleft",
split_label = "Treatment Arm"
) %>%
split_rows_by(
var = "PKPARAM",
label_pos = "topleft",
split_label = "PK Parameter",
child_labels = "hidden"
) %>%
analyze_vars_in_cols(
vars = "AVAL",
.stats = c(
"n", "mean", "sd", "cv",
"geom_mean", "geom_cv", "median",
"min", "max"
),
.labels = c(
n = "n",
mean = "Mean",
sd = "SD",
cv = "CV (%)",
geom_mean = "Geometric Mean",
geom_cv = "CV % Geometric Mean",
median = "Median",
min = "Minimum",
max = "Maximum"
),
.formats = c(
n = "xx.",
mean = format_sigfig(3),
sd = format_sigfig(3),
cv = "xx.x",
median = format_sigfig(3),
geom_mean = format_sigfig(3),
geom_cv = "xx.x",
min = format_sigfig(3),
max = format_sigfig(3)
)
)
Plasma Drug X
Code
adpp0 <- adpp %>%
filter(PPCAT == "Plasma Drug X") %>%
h_pkparam_sort() %>%
mutate(PKPARAM = factor(paste0(TLG_DISPLAY, " (", AVALU, ")"))) %>%
mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))
result <- build_table(lyt, df = adpp0)
main_title(result) <- paste("Summary of", unique(adpp0$PPSPEC), "PK Parameter by Treatment Arm, PK Population")
subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(adpp0$AVISIT))
result
Summary of Urine 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
Ae (mg) 268 1.55 0.338 21.8 1.51 23.0 1.55 0.702 2.46
Fe (%) 268 15.7 3.35 21.3 15.3 22.2 15.8 8.15 24.5
CLR (L/hr) 134 0.0492 0.00961 19.5 0.0482 21.0 0.0491 0.0249 0.0751
RENALCLD (L/hr/mg) 134 0.00487 0.000965 19.8 0.00477 21.2 0.00497 0.00238 0.00726
ARM C
Ae (mg) 264 1.54 0.298 19.4 1.51 20.3 1.55 0.850 2.21
Fe (%) 264 16.1 3.10 19.3 15.8 20.2 16.0 8.50 24.4
CLR (L/hr) 132 0.0502 0.0105 20.9 0.0491 21.9 0.0498 0.0251 0.0856
RENALCLD (L/hr/mg) 132 0.00511 0.000934 18.3 0.00502 19.7 0.00515 0.00236 0.00741
Plasma Drug Y
Code
adpp1 <- adpp %>%
filter(PPCAT == "Plasma Drug Y") %>%
h_pkparam_sort() %>%
mutate(PKPARAM = factor(paste0(TLG_DISPLAY, " (", AVALU, ")"))) %>%
mutate(PKPARAM = reorder(PKPARAM, TLG_ORDER))
result <- build_table(lyt, df = adpp1)
main_title(result) <- paste("Summary of", unique(adpp1$PPSPEC), "PK Parameter by Treatment Arm, PK Population")
subtitles(result) <- paste("Analyte:", unique(adpp1$PPCAT), "\nVisit:", unique(adpp1$AVISIT))
result
Summary of Urine 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
Ae (mg) 264 1.60 0.315 19.7 1.56 21.4 1.60 0.857 2.26
Fe (%) 264 15.8 3.08 19.4 15.5 20.2 15.7 8.31 23.8
CLR (L/hr) 132 0.0497 0.0101 20.3 0.0486 22.0 0.0491 0.0184 0.0776
RENALCLD (L/hr/mg) 132 0.00509 0.00103 20.3 0.00499 21.4 0.00502 0.00236 0.00794
Timestamp
Session Info
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.9007 rtables_0.6.7.9002 magrittr_2.0.3
[4] formatters_0.5.6.9004 dplyr_1.1.4
loaded via a namespace (and not attached):
[1] Matrix_1.7-0 gtable_0.3.5
[3] jsonlite_1.8.8 compiler_4.4.0
[5] brio_1.1.5 tidyselect_1.2.1
[7] stringr_1.5.1 tidyr_1.3.1
[9] splines_4.4.0 scales_1.3.0
[11] yaml_2.3.8 fastmap_1.1.1
[13] lattice_0.22-6 ggplot2_3.5.1
[15] R6_2.5.1 generics_0.1.3
[17] knitr_1.46 rbibutils_2.2.16
[19] htmlwidgets_1.6.4 backports_1.4.1
[21] checkmate_2.3.1 tibble_3.2.1
[23] munsell_0.5.1 pillar_1.9.0
[25] rlang_1.1.3 utf8_1.2.4
[27] testthat_3.2.1.1 stringi_1.8.3
[29] broom_1.0.5 xfun_0.43
[31] cli_3.6.2 Rdpack_2.6
[33] digest_0.6.35 grid_4.4.0
[35] lifecycle_1.0.4 vctrs_0.6.5
[37] evaluate_0.23 glue_1.7.0
[39] codetools_0.2-20 survival_3.6-4
[41] random.cdisc.data_0.3.15.9003 fansi_1.0.6
[43] colorspace_2.1-0 purrr_1.0.2
[45] rmarkdown_2.26 tools_4.4.0
[47] 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.
Code
parent_file_path <- knitr::current_input(dir = TRUE)
book_root_dir <- parent_file_path
while (!file.exists(file.path(book_root_dir, "_quarto.yml"))) book_root_dir <- dirname(book_root_dir)
lock_path <- file.path(
"../../assets/www/lock",
paste0(
gsub(
file.path(book_root_dir, ""),
"",
gsub(
"\\.rmarkdown$",
"",
knitr::current_input(dir = TRUE)
)
),
".lock"
)
)
withr::with_options(
list(renv.verbose = FALSE),
renv::snapshot(parent_file_path, lockfile = lock_path, prompt = FALSE, force = TRUE)
)