MonolixSuite in R
Auto Light Dark
Auto Light Dark

tableNCAConcentration()

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

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

  • useNominalTime (logical) If TRUE (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) 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.

  • useWideFormat (logical) If TRUE (default), time points are columns and statistics are rows (Statistic | [Covariates] | Time_0 | Time_1 | …). If FALSE, time points are rows and statistics are columns (Time | [Covariates] | mean | SD | …). stratifyColumns = TRUE requires FALSE.

  • maxTimeDeviation (numeric) Maximum allowed percentage deviation between actual and nominal time. If NULL (default), no filtering. When set (e.g. 20 for 20%), observations exceeding the threshold are excluded from summary statistics (NominalTime = 0 is always kept). Only applies when useNominalTime = TRUE; individual data (includeId = TRUE) is unaffected.

  • includeId (logical) If TRUE, appends individual subject IDs and their concentrations at each time point below the summary statistics, grouped by covariate when stratified. Default FALSE. Only applies when stratifyColumns = FALSE.

  • filterCovariates (list) Named list of categorical covariates → allowed values, e.g. list(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 rounded. roundDigits controls 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 to roundDigits significant figures. Small values (< 1) automatically get more decimal places.

    • "significantFigures" - Standard significant-figures rounding: the value is rounded 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 at least roundDigits digits, 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) If TRUE (default), converts column names to human-readable labels (e.g. "CV" → "CV (%)").

  • mock (logical) If TRUE, masks values for documentation/examples (statistic values become "xx.xx", covariate levels become "Category 1"…, IDs become "id1"…). Time headers and Statistic/Section labels are kept. Default FALSE.

Examples

Last updated: