identify_outliers.Rd
This function identifies outliers in a specified column of a data frame. It returns a tibble containing the unique values, tally, and whether it is an outlier or not.
identify_outliers(df, var)
The data frame.
The column to check for outliers.
A tibble containing the unique values, tally, and whether each value is an outlier or not.
df <- data.frame(a = c(1, 2, 3, 100, 101), b = c(4, 5, 6, 7, 8), c = c(7, 8, 9, 100, 101))
outliers <- identify_outliers(df, "a")
print(outliers)
#> # A tibble: 1 × 3
#> `"a"` n outlier
#> <chr> <int> <lgl>
#> 1 a 5 FALSE