Returns a reporting-ready summary table of NCA parameters from a PKanalix project. Supports stratification by covariates and occasions, wide or vertical layouts, per-parameter rounding, (custom) aliases/units, and optional inclusion of individual subject values.
Usage
tableNCAParameters(projectFile = NULL,
splitCovariates = NULL,
selectParameters = NULL,
metrics = NULL,
useWideFormat = TRUE,
stratifyColumns = FALSE,
covariateLabels = NULL,
includeId = FALSE,
filterCovariates = NULL,
filterIds = NULL,
roundDigits = 3,
roundMethod = c("monolixSuiteRounding", "significantFigures", "significantFiguresPreserved", "none"),
roundByParameter = NULL,
units = TRUE,
aliases = TRUE,
customUnits = NULL,
customAliases = NULL,
prettyLabels = TRUE,
mock = FALSE)
Arguments
-
projectFile(character) Path to a PKanalix project file (.pkx). IfNULL(default), uses the currently loaded project; loads the given project if it differs from the active one. -
splitCovariates(character) Covariate name(s) to stratify by, e.g."TREAT"orc("TREAT","FOOD"). IfNULL(default), no stratification — overall summaries only. -
selectParameters(character) NCA parameter names to include. IfNULL(default), all parameters currently enabled in the project are used. -
metrics(character) Summary statistics to include. IfNULL(default), all available metrics are included. Accepted values (returned bygetDescriptiveStatsMetrics(), in calculation order):-
Counts:
"N","Nobs" -
Range / percentiles:
"min","P05","Q1","median","Q3","P95","max" -
Central tendency & dispersion:
"mean","SD","SE","CV" -
Geometric / harmonic:
"geoMean","geoSD","geoCV","harmMean" -
Combined display metrics:
"MeanSD","MeanCV","GeomCV","GeomSD"
-
-
useWideFormat(logical) IfTRUE(default), returns a wide table with one row per covariate level (PKanalix-like). IfFALSE, returns a vertical table withStatisticas the first column (better for reporting). -
stratifyColumns(logical) IfTRUE, creates separate columns per covariate combination plus an "Overall" column. IfFALSE(default), covariates appear as left-side columns. Only applies whensplitCovariatesis set anduseWideFormat = FALSE. -
covariateLabels(character) Custom labels forsplitCovariates(same length). IfNULL(default), the original covariate names are used. Shown in headers whenstratifyColumns = TRUE. -
includeId(logical) IfTRUE(withuseWideFormat = FALSE), appends individual subject IDs and their values below the summary statistics, grouped by covariate when stratified. DefaultFALSE. -
filterCovariates(list) Named list of categorical covariates → allowed values, e.g.list(DOSE = c("100mg","200mg"), SEX = "Male"). IfNULL(default), no covariate filtering is applied. -
filterIds(character/numeric) Subject IDs to include. IfNULL(default), no ID filtering is applied. -
roundDigits(integer) Number of decimal places for rounding (default3). -
roundMethod(character) How numeric values are rounde:-
"monolixSuiteRounding"(default) - Mirrors MonolixSuite display. The integer part is kept exactly as-is, and only the fractional part is rounded toroundDigitssignificant figures (so small values < 1 get more decimal places). -
"significantFigures"- Standard significant-figures rounding toroundDigitstotal significant digits, zeroing non-significant digits before the decimal for large numbers. -
"significantFiguresPreserved"- Like"significantFigures", but never zeroes digits before the decimal: once the integer part already hasroundDigitsdigits, the value is rounded to the nearest whole number. -
"none"- No rounding.
-
-
roundByParameterOptional per-parameter rounding overrides on top of the global settings - either a named numeric vector of digits (c(Cmax = 2, AUClast = 4)) or a 3-column data frame (parameter,digits,method). Unlisted parameters keep global settings (defaultNULL). -
units(logical) IfTRUE(default), units are appended to parameter names. -
aliases(logical) IfTRUE(default), parameter aliases (friendly names) are used instead of internal codes. -
customUnits(character / data.frame) Named vector or 2-column data frame mapping parameters → custom unit labels, e.g.c(Cmax = "ng/mL", AUClast = "h*ng/mL"). -
customAliases(character / data.frame) Named vector or 2-column data frame mapping parameters → custom alias labels, e.g.c(Cmax = "C[[sub:max]]"). Supports[[sub:…]],[[sup:…]],~italic~. -
prettyLabels(logical) IfTRUE(default), converts column names to human-readable labels (e.g."CV"→"CV (%)"). -
mock(logical) IfTRUE, masks values for documentation/examples (metric values become"xx.xx", covariate levels become"Category 1"…, IDs become"id1"…). DefaultFALSE.
Returns: A data frame combining standard NCA statistics with additional descriptive statistics for the selected parameters; when includeId = TRUE, also individual per-subject values.
Examples