Stage 2: run the cleaning pipeline
Usage
stage_clean(
state,
multi_analyte_resolutions = NULL,
value_corrections = NULL,
cleaning_steps = NULL
)Arguments
- state
State list from
stage_ingest().- multi_analyte_resolutions
Optional data frame/list with
row_index(orrow),action, and optionalvalue/valuescolumns.row_indexis theoriginal_row_idas written topending.csv, so it stays valid after synonym or multi-analyte splits. Applied after cleaning and before curation.- value_corrections
Optional data frame with
column,pattern,replacement, and optionalmatch_modecolumns. Applied to the detected data before cleaning, so before Unicode folding: match Unicode hyphens with\\p{Pd}, not-. Seeapply_value_corrections().- cleaning_steps
Optional named list of logicals switching cleaning steps on or off:
unicode,whitespace,cas,names,synonyms,isotopes,multi,chiral,truncated,bare_formula,reference_flags. Omitted names keep their defaults.
