This function creates a dataset with dose intervals and specified pharmacokinetic parameters.
Usage
format_pkncadata_intervals(
pknca_conc,
pknca_dose,
params = c("aucinf.obs", "aucint.last", "auclast", "cmax", "half.life", "tmax",
"lambda.z", "lambda.z.n.points", "r.squared", "adj.r.squared", "lambda.z.time.first",
"aucpext.obs", "aucpext.pred", "clast.obs", "cl.obs"),
start_from_last_dose = TRUE
)
Details
The function performs the following steps:
Creates a vector with all pharmacokinetic parameters.
Based on dose times, creates a data frame with start and end times.
If TAU column is present in data, sets last dose end time to start + TAU
If no TAU column in data, sets last dose end time to the time of last sample
Adds logical columns for each specified parameter.