Returns a reporting-ready summary table of NCA concentration data over time from a PKanalix project. Transforms individual concentration profiles into summary statistics per time point, with optional stratification by covariates, wide or long layouts, nominal-time handling with deviation filtering, and optional inclusion of individual subject values.
Usage
tableNCAConcentration(projectFile = NULL,
splitCovariates = NULL,
useNominalTime = TRUE,
metrics = NULL,
stratifyColumns = FALSE,
covariateLabels = NULL,
useWideFormat = TRUE,
maxTimeDeviation = NULL,
includeId = FALSE,
filterCovariates = NULL,
filterIds = NULL,
roundDigits = 3,
roundMethod = c("monolixSuiteRounding", "significantFigures", "significantFiguresPreserved", "none"),
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.c("DOSE","FOOD"). IfNULL(default), no stratification — overall summaries only. -
useNominalTime(logical) IfTRUE(default), uses nominal time for the summary table; if nominal time is unavailable in the project, falls back to actual time with a warning. -
metrics(character) Summary statistics to include. If NULL (default), all available metrics are included. Accepted values (returned by getDescriptiveStatsMetrics(), 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"
-
-
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. -
useWideFormat(logical) IfTRUE(default), time points are columns and statistics are rows (Statistic | [Covariates] | Time_0 | Time_1 | …). IfFALSE, time points are rows and statistics are columns (Time | [Covariates] | mean | SD | …).stratifyColumns = TRUErequiresFALSE. -
maxTimeDeviation(numeric) Maximum allowed percentage deviation between actual and nominal time. IfNULL(default), no filtering. When set (e.g.20for 20%), observations exceeding the threshold are excluded from summary statistics (NominalTime = 0is always kept). Only applies whenuseNominalTime = TRUE; individual data (includeId = TRUE) is unaffected. -
includeId(logical) IfTRUE, appends individual subject IDs and their concentrations at each time point below the summary statistics, grouped by covariate when stratified. DefaultFALSE. Only applies whenstratifyColumns = FALSE. -
filterCovariates(list) Named list of categorical covariates → allowed values, e.g.list(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 rounded.roundDigitscontrols the number of digits in each case. Options:-
"monolixSuiteRounding"(default) - Mirrors MonolixSuite display. The integer part is kept exactly as-is, and only the fractional part is rounded toroundDigitssignificant figures. Small values (< 1) automatically get more decimal places. -
"significantFigures"- Standard significant-figures rounding: the value is rounded 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 has at leastroundDigitsdigits, the value is simply rounded to the nearest whole number instead of being zeroed out. -
"none"- No rounding; values are returned as-is.
-
-
prettyLabels(logical) IfTRUE(default), converts column names to human-readable labels (e.g."CV"→"CV (%)"). -
mock(logical) IfTRUE, masks values for documentation/examples (statistic values become"xx.xx", covariate levels become"Category 1"…, IDs become"id1"…). Time headers andStatistic/Sectionlabels are kept. DefaultFALSE.
Examples