flag_outliers: Creates a flag for outlying values

View source: R/flag_outliers.r

flag_outliersR Documentation

Creates a flag for outlying values

Description

This function creates a flag identifying the outliers in a vector

Usage

flag_outliers(var, type = "boxstat")

Arguments

var

numeric vector that should be checked for outliers

type

character with the type of test to perform for outliers (currently only the "boxstats" is available that uses the boxplot method)

Value

a numeric vector the same length as var with either 0 (no outlier) or 1 (outlier)

Author(s)

Richard Hooijmaijers

Examples


dfrm <- data.frame(a = 1:10, b = c(1:9,50))
flag_outliers(dfrm$a)
flag_outliers(dfrm$b)

amp.dm documentation built on March 13, 2026, 5:08 p.m.