powered by
Removes outliers from numeric data using the Median Absolute Deviation (MAD) method. Outliers are replaced with NA values.
clean_data(x, k = 3, take_log = FALSE)
A numeric vector of the same length as x, where detected outliers have been replaced with NA.
x
NA
Numeric vector to clean.
Numeric threshold for outlier detection (default: 3).
Logical. Deprecated parameter. Log transformation should be done before calling this function.
detect_outliers_mad for the underlying outlier detection.
detect_outliers_mad
# Clean parameter values params <- c(0.01, 0.012, 0.011, 0.1, 0.009, 0.011, 0.15) clean_params <- clean_data(params)
Run the code above in your browser using DataLab