This function reshapes the structure of the results produced by the main function of the PKNCA package (pk.nca) in a way that each row represents all the main results summarized for each profile in each individual/subject. Excluding the ID variables, each column name corresponds with a calculated parameter and between brackets its corresponding units. AUC intervals, if present, are be added as additional columns.
Arguments
- myres
The output of PKNCA::pk.nca. It makes some additional assumptions:
CDISC denomination of actual and nominal time variables (AFRLT, ARRLT, NFRLT, NRRLT).
Intervals must include a column (
type_interval) to differentiate between the custom AUC ranges ("manual") and main parameter calculations ("main").Includes
PPSTRESandPPSTRESUvariables in results dataset.Columns
start_doseandend_dosemust express the actual start and end times of the dose, relative to the last reference dose.Temporarily: CDISC denomination of PK parameters related to half-life: "LAMZNPT", "LAMZLL", "LAMZ" Used to derive
LAMZNPTandLAMZMTD.
- flag_rules
A named list of flagging rules to be applied to the results. Each rule should be a list with two elements:
is.checked(logical) indicating whether the rule should be applied, andthreshold(numeric) specifying the threshold value for flagging. The name of each rule should correspond to a parameter in the results data.frame as a PPTESTCD (e.g., "R2ADJ", "AUCPEO", "AUCPEP", "LAMZSPN").- extra_vars_to_keep
Optional character vector of variable names to join from the concentration data to the output. Default is NULL.
Value
A data frame which provides an easy overview on the results from the NCA
in each profile/subject and how it was computed lambda (half life) and the results
of the NCA parameters (cmax, AUC, AUClast), including new columns Exclude (a
derivation from pknca$exclude), Missing(indicating if flag parameters are missing
from PKNCA calculation), and flagged (indicating if the row
is ACCEPTED, FLAGGED or MISSING based on the flagging rules).