View source: R/data_preprocessing.R
clean_data | R Documentation |
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)
x |
Numeric vector to clean. |
k |
Numeric threshold for outlier detection (default: 3). |
take_log |
Logical. Deprecated parameter. Log transformation should be done before calling this function. |
A numeric vector of the same length as x
, where detected outliers have been replaced with NA
.
detect_outliers_mad
for the underlying outlier detection.
# Clean parameter values
params <- c(0.01, 0.012, 0.011, 0.1, 0.009, 0.011, 0.15)
clean_params <- clean_data(params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.