is_outlier: Identify outliers

View source: R/wafR_functions.R

is_outlierR Documentation

Identify outliers

Description

Function that identifies whether observations are outliers.

Usage

is_outlier(x, type = "both", outlier_range = 1.5)

Arguments

x

The variable of interest

type

Choose whether to identify 'high', 'low', or 'both' types of outliers. Default is 'both'.

outlier_range

The number of times outside the IQR that an observation is deemed to be an outlier. Default = 1.5.

Examples

x <- rnorm(n = 1000, mean = 100) # Create a normally distributed dataset

is_outlier(x) # Find outliers

boxplot(x) # Plot x to visualise the outliers

jonathandash/wafR documentation built on March 27, 2022, 11:47 a.m.