Remove data outliers based on the interquartile range.
Usage
removeOutliers(x, k = 1.5)
Value
A numeric vector with the same length as input vector.
Arguments
x
vector of data.
k
factor applied to the interquartile range (default = 1.5).
Details
The interquartile range IQR is computed from input dataset as IQR = Q3 - Q1,
where Q1 is 25th percentile and Q3 is the 75th percentile.
Values larger than Q3 + k * IQR and smaller than Q1 - k * IQR are deemed
as outliers and substituted with NA's.