Clean negative numeric values, log issues, and capture diagnostics

clean_negative_values(
  data,
  cols,
  dataset_name,
  diagnostics_dir,
  issue_log,
  n_total,
  verbose = F
)

Arguments

data

Data frame to clean

cols

Character vector of column names to check for negative values

dataset_name

Name of dataset (for diagnostic file naming)

diagnostics_dir

Directory to save diagnostic CSV files

issue_log

Existing issue log to append to

n_total

This is passed from the dispatch function.

verbose

Logical, print detailed progress messages (default: FALSE). Passed from the dispatch function.

Value

List with cleaned data, updated issue log, and negative value details