Flag outliers based on the interquartile range
Usage
outliers_by_iqr(x, threshold = 1.5, direction = c("both", "low", "high"))
Examples
x <- c(1, 1, 2, 2, 4, 6, 11)
outliers_by_iqr(x)
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE TRUE
# Using direction="low" disregards outliers above threshold, for example
outliers_by_iqr(x, direction="low")
#> [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE