PKPT08
Pharmacokinetic Parameter Summary of Cumulative Amount of Drug Eliminated and Cumulative Percentage of Drug Recovered (Stats in Columns)
Code
# create layout
lyt <- basic_table() %>%
add_overall_col("Accumulation Interval (hours)") %>%
split_cols_by(var = "PPINT") %>%
split_cols_by(var = "PKPARAM") %>%
split_rows_by(
var = "ARMCD",
split_fun = trim_levels_in_group("ACTARM"),
label_pos = "topleft",
split_label = "Treatment Arm"
) %>%
analyze_vars(
vars = "AVAL",
.stats = c(
"n", "mean", "sd", "cv",
"median", "min", "max"
),
.labels = c(
n = "n",
mean = "Mean",
sd = "SD",
cv = "CV (%)",
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),
min = format_sigfig(3),
max = format_sigfig(3)
)
)
adpp0 <- adpp %>%
filter(
AVISIT == "CYCLE 1 DAY 1",
PPCAT == "Plasma Drug X"
) %>%
h_pkparam_sort() %>%
mutate(
PKPARAM = factor(paste0(TLG_DISPLAY, " (", AVALU, ")"))
)
result <- build_table(lyt, df = adpp0)
main_title(result) <- paste(
"Summary of Cumulative Amount and Percentage of", unique(adpp0$PPSPEC), "Recovered from\n",
unique(adpp0$PPCAT), "following", unique(adpp0$REGIMEN), "Administration for",
unique(adpp0$PPINT)[length(unique(adpp0$PPINT))], "hours, PK Population"
)
subtitles(result) <- paste("Analyte:", unique(adpp0$PPCAT), "\nVisit:", unique(adpp0$AVISIT))
cat(rtables::toString(result, indent_size = 10))
Summary of Cumulative Amount and Percentage of Urine Recovered from
Plasma Drug X following BID Administration for 0-24 hours, PK Population
Analyte: Plasma Drug X
Visit: CYCLE 1 DAY 1
----------------------------------------------------------
Accumulation Interval (hours)
0-12 0-24
Treatment Arm Ae (mg) Fe (%) Ae (mg) Fe (%)
----------------------------------------------------------
ARM A
n 134 134 134 134
Mean 1.55 15.7 1.55 15.7
SD 0.339 3.35 0.339 3.35
CV (%) 21.9 21.4 21.9 21.4
Median 1.55 15.8 1.55 15.8
Minimum 0.702 8.15 0.702 8.15
Maximum 2.46 24.5 2.46 24.5
ARM C
n 132 132 132 132
Mean 1.54 16.1 1.54 16.1
SD 0.298 3.11 0.298 3.11
CV (%) 19.4 19.3 19.4 19.3
Median 1.55 16.0 1.55 16.0
Minimum 0.850 8.50 0.850 8.50
Maximum 2.21 24.4 2.21 24.4
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] scda.2022_0.1.5 scda_0.1.6 dplyr_1.1.4
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 fansi_1.0.6
[41] colorspace_2.1-0 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)
)