Same as identify_vector_outliers_global()
except the quantile computation is performed
in a sliding window centered on each sample. Currently the computation is not
really efficient and runs in O (n*w*log (w))
for window size w
.
Arguments
- .input
Sample vector.
- .window
Window size in samples.
- .limit
Quantile that separates inliers from outliers.
- .slack
Tolerated distance from limit quantile.
Examples
# A sample of 100 is considered an outlier when near
# different values but not when near similar values.
identify_vector_outliers_window (c (100, 15:25, 95:105, 100), .window = 10)
#> [1] TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
#> [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE