powered by
This function removes outliers in the data, which are far from the sample median.
outlier.remove(x, rg = 3)
a list containing the following:
a new data vector with outliers replaced with \(NA\). The original missing values in the data are preserved.
the locations of the outliers in the data vector.
a numeric data vector.
a positive number indicating how the outliers are defined; see details.
Yong He, Xinbing Kong, Lorenzo Trapani, Long Yu
An outlier is detected if it deviates from the sample median more than rg times interquantile range.
a=c(1:5,NA,10000) outlier.remove(a,3)
Run the code above in your browser using DataLab