Skip to contents

Only replaces integer codes listed in the missing: YAML block. Literal NA entries in the YAML (written as ~) are ignored here because those cells are already NA in R.

Usage

.apply_missing_codes(dt, config, cols)

Arguments

dt

A data.table (modified by reference).

config

Config object from load_config().

cols

Character vector of column names to process.

Value

dt invisibly.

Details

This step is intentionally opt-in (apply_missing = TRUE in clean_dataset()) because silently converting plausible integers like 8 or 9 to NA can mask data problems.