PKPT04
Pharmacokinetic Parameter Summary – Urine PK Parameters (Stats in Rows)
Code
# lyt creation
lyt <- basic_table() %>%
split_cols_by(
var = "ARMCD",
split_fun = trim_levels_in_group("ARMCD"),
split_label = "Treatment Arm"
) %>%
split_rows_by(
var = "PKPARAM",
label_pos = "topleft",
split_label = "PK Parameter"
) %>%
tern::analyze_vars(
vars = "AVAL",
.stats = c("n", "mean_sd", "cv", "geom_mean", "geom_cv", "median", "range"),
.formats = c(
n = "xx.",
mean_sd = format_sigfig(3, "xx (xx)"),
cv = "xx.x",
geom_mean = format_sigfig(3),
geom_cv = "xx.x",
median = format_sigfig(3),
range = format_sigfig(3, "xx - xx")
)
)
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
---------------------------------------------------------------
PK Parameter ARM A ARM C
---------------------------------------------------------------
Ae (mg)
n 268 264
Mean (SD) 1.55 (0.338) 1.54 (0.298)
CV (%) 21.8 19.4
Geometric Mean 1.51 1.51
CV % Geometric Mean 23.0 20.3
Median 1.55 1.55
Min - Max 0.702 - 2.46 0.850 - 2.21
Fe (%)
n 268 264
Mean (SD) 15.7 (3.35) 16.1 (3.10)
CV (%) 21.3 19.3
Geometric Mean 15.3 15.8
CV % Geometric Mean 22.2 20.2
Median 15.8 16.0
Min - Max 8.15 - 24.5 8.50 - 24.4
CLR (L/hr)
n 134 132
Mean (SD) 0.0492 (0.00961) 0.0502 (0.0105)
CV (%) 19.5 20.9
Geometric Mean 0.0482 0.0491
CV % Geometric Mean 21.0 21.9
Median 0.0491 0.0498
Min - Max 0.0249 - 0.0751 0.0251 - 0.0856
RENALCLD (L/hr/mg)
n 134 132
Mean (SD) 0.00487 (0.000965) 0.00511 (0.000934)
CV (%) 19.8 18.3
Geometric Mean 0.00477 0.00502
CV % Geometric Mean 21.2 19.7
Median 0.00497 0.00515
Min - Max 0.00238 - 0.00726 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
-----------------------------------------
PK Parameter ARM C
-----------------------------------------
Ae (mg)
n 264
Mean (SD) 1.60 (0.315)
CV (%) 19.7
Geometric Mean 1.56
CV % Geometric Mean 21.4
Median 1.60
Min - Max 0.857 - 2.26
Fe (%)
n 264
Mean (SD) 15.8 (3.08)
CV (%) 19.4
Geometric Mean 15.5
CV % Geometric Mean 20.2
Median 15.7
Min - Max 8.31 - 23.8
CLR (L/hr)
n 132
Mean (SD) 0.0497 (0.0101)
CV (%) 20.3
Geometric Mean 0.0486
CV % Geometric Mean 22.0
Median 0.0491
Min - Max 0.0184 - 0.0776
RENALCLD (L/hr/mg)
n 132
Mean (SD) 0.00509 (0.00103)
CV (%) 20.3
Geometric Mean 0.00499
CV % Geometric Mean 21.4
Median 0.00502
Min - Max 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 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 Rdpack_2.6 digest_0.6.35
[33] grid_4.4.0 lifecycle_1.0.4 vctrs_0.6.5 evaluate_0.23
[37] glue_1.7.0 codetools_0.2-20 survival_3.6-4 colorspace_2.1-0
[41] fansi_1.0.6 purrr_1.0.2 rmarkdown_2.26 tools_4.4.0
[45] 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)
)