Find outliers with the IQR (numbers should be less than 1.5 times the interquartile range away from the quartiles) or with the STD (numbers should be less than 3 times the standard deviation away from the mean)

find_outliers(x, fields, method="iqr")

Arguments

x

data.frame

fields

character. variable names in x

method

"iqr" or "std"

Value

list

Examples

set.seed(3)
d <- data.frame(a = runif(50), b=rnorm(50))
d$a[1] <- 100
find_outliers(d, c("a", "b"))
#> $a
#> [1] 1
#> 
#> $b
#> [1] 21
#>