Documentation

38.2 Delimited tables: headers, row grain, missing values, and numbers

Chapter 38.2 visual
Output reference workflow

Most nlmx CSV files are UTF-8 text with a header and LF line endings. The common writer uses a comma delimiter, doubles embedded quotes, and quotes a field when it contains a comma, quote or newline. Use a real RFC-4180-capable parser; splitting on commas will corrupt quoted messages, labels and commands.

Missing and non-finite numbers

The common CSV numeric helper writes non-finite values as an empty field. An empty numeric cell therefore commonly means unavailable/not estimable/not applicable, but an empty string can be a valid text state in another column. Preserve missingness separately from zero. JSON serialization represents non-finite values as null. sims is an important exception: its configurable delimited tables default to . for missing and may use comma, tab, semicolon or space delimiters. NONMEM-format files follow their own sentinel/layout rules.

Types are schema, not appearance

CSV has no native types. Infer types from this reference and validate every value. A Boolean may appear as true/false in one table and 0/1 in another. IDs may be numeric-looking strings and must not be converted to floating point. Large row numbers, seeds and iteration identifiers need integer-safe handling. Preserve original text for audit even when creating typed analytical copies.

Row grain and keys

Before grouping or joining, state what one row means. Common grains include source record, observation, subject, subject-occasion/profile, parameter, candidate equation, model, bin/stratum, simulation-subject, scenario-test and event. ID alone is rarely a universal key: add SIM, OCCASION, ROW, REP, MODEL, ANALYSIS, STRATUM, BIN or other grain fields as required.

Never join on row order. Use named keys and test uniqueness. Count rows before and after joins. If a table contains dynamic columns—ETAs, parameter labels, configured statistics or carried source columns—validate the required core and explicitly allow documented additions.

Names and units

Column case is file-specific. Use exact names and avoid normalizing punctuation unless an adapter records the mapping. Units are frequently inherited from the dataset/model or supplied as labels; they are not universally converted. Require unit metadata from settings, a UNIT column, the control stream, or a retained data dictionary. Percent fields are usually named _PCT; ratios/fractions and percentages must not be interchanged.

Robust import gate

  1. Verify version, producer, completion and hash.
  2. Detect delimiter/format using the producer contract—not filename alone.
  3. Require key columns and reject duplicates at the expected grain.
  4. Parse explicit types and preserve missing values.
  5. Check ranges, units, counts and referential integrity.
  6. Reconcile totals with the summary/log.
  7. Save parser version, warnings and rejected rows.

See the previous page, next page, and complete output reference.