This function cleans water quality data by addressing common issues.
Arguments
- df
A dataframe with water quality data, including columns "Station", "DATE", "Variables", "Values", "Source".
- zero_to_min
(optional) A numeric coefficient to replace zeros by the minimum variable value multiplied by zero_to_min. Default is
zero_to_min = 0.5
.
Examples
if (FALSE) {
# Load calibration data from an Excel file
temp_path <- system.file("extdata", "calibration_data.xlsx", package = "SWATprepR")
cal_data <- load_template(temp_path)
# Clean water quality data
cal_data$data <- clean_wq(cal_data$data)
}