transform_micro | R Documentation |
Transforms PK micro parameters into compartmental parameters. Designed as a table-friendly wrapper for micro2macro. Tries to calculate AUC = dose/CL, VSS = V1+V2+V3, and Vz = CL/gamma.
transform_micro(x, FUN, digits = 3, ...)
x |
data.frame with V1, k10, and optionally k12, k21, k13, k31 |
FUN |
a list-based function to transform micro parameters, e.g., pmxTools::calc_derived() |
digits |
places of significance for numerics, or NULL for raw results |
... |
passed to FUN |
data.frame
set.seed(0)
x = data.frame(
dose = 10,
V1 = sample(4:10, size = 3, replace = TRUE),
k10 = exp(rnorm(3, mean=log(0.79), sd=log(2))),
k12 = exp(rnorm(3, mean=log(0.95), sd=log(2))),
k13 = exp(rnorm(3, mean=log(0.005), sd=log(2))),
k21 = exp(rnorm(3, mean=log(1.24), sd=log(2))),
k31 = exp(rnorm(3, mean=log(0.036), sd=log(2)))
)
library(pmxTools)
library(magrittr)
# 3 CMT
x %>% transform_micro( calc_derived )
# 2 CMT
x %>% dplyr::select(-k13) %>% transform_micro( calc_derived )
# 1 CMT
x %>% dplyr::select(-k13, -k12) %>% transform_micro( calc_derived )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.