powered by
Identify outliers in a numeric column using the IQR method (values outside 1.5 \(\times\) IQR from Q1/Q3).
find_outlier(df, var, other_var = NULL)
A tibble with columns row_index, outlier_value, and any requested other_var columns.
row_index
outlier_value
other_var
A data frame.
Name of the column to check for outliers (string).
Character vector of additional column names to return alongside the outlier values, or NULL.
NULL
df <- data.frame(val = c(1, 2, 2, 3, 100), id = 1:5) find_outlier(df, "val", "id")
Run the code above in your browser using DataLab