MonolixSuite in R
Auto Light Dark
Auto Light Dark

tableNCAParameters()

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

R
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). If NULL (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" or c("TREAT","FOOD"). If NULL (default), no stratification — overall summaries only.

  • selectParameters (character) NCA parameter names to include. If NULL (default), all parameters currently enabled in the project are used.

  • 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"

  • useWideFormat (logical) If TRUE (default), returns a wide table with one row per covariate level (PKanalix-like). If FALSE, returns a vertical table with Statistic as the first column (better for reporting).

  • stratifyColumns (logical) If TRUE, creates separate columns per covariate combination plus an "Overall" column. If FALSE (default), covariates appear as left-side columns. Only applies when splitCovariates is set and useWideFormat = FALSE.

  • covariateLabels (character) Custom labels for splitCovariates (same length). If NULL (default), the original covariate names are used. Shown in headers when stratifyColumns = TRUE.

  • includeId (logical) If TRUE (with useWideFormat = FALSE), appends individual subject IDs and their values below the summary statistics, grouped by covariate when stratified. Default FALSE.

  • filterCovariates (list) Named list of categorical covariates → allowed values, e.g. list(DOSE = c("100mg","200mg"), SEX = "Male"). If NULL (default), no covariate filtering is applied.

  • filterIds (character/numeric) Subject IDs to include. If NULL (default), no ID filtering is applied.

  • roundDigits (integer) Number of decimal places for rounding (default 3).

  • 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 to roundDigits significant figures (so small values < 1 get more decimal places).

    • "significantFigures" - Standard significant-figures rounding to roundDigits total 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 roundDigits digits, the value is rounded to the nearest whole number.

    • "none" - No rounding.

  • roundByParameter Optional 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 (default NULL).

  • units (logical) If TRUE (default), units are appended to parameter names.

  • aliases (logical) If TRUE (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) If TRUE (default), converts column names to human-readable labels (e.g. "CV" → "CV (%)").

  • mock (logical) If TRUE, masks values for documentation/examples (metric values become "xx.xx", covariate levels become "Category 1"…, IDs become "id1"…). Default FALSE.

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

Last updated: