find_outlier: find_outlier

View source: R/statistics.R

find_outlierR Documentation

find_outlier

Description

Identify outliers in a numeric column using the IQR method (values outside 1.5 \times IQR from Q1/Q3).

Usage

find_outlier(df, var, other_var = NULL)

Arguments

df

A data frame.

var

Name of the column to check for outliers (string).

other_var

Character vector of additional column names to return alongside the outlier values, or NULL.

Value

A tibble with columns row_index, outlier_value, and any requested other_var columns.

Examples

df <- data.frame(val = c(1, 2, 2, 3, 100), id = 1:5)
find_outlier(df, "val", "id")

aelab documentation built on Feb. 23, 2026, 5:07 p.m.