remove_outliers: Remove outliers

View source: R/remove_outliers.R

remove_outliersR Documentation

Remove outliers

Description

Remove outliers from a data vector

Usage

remove_outliers(x, na.rm = TRUE, ...)

Arguments

x
na.rm
...

Details

Determine if that point is further than 1.5 * IQR away from the mean. If so, that point is an outlier and should be eliminated from the data resulting in a new set of data.

Author(s)

Pablo Marin

Examples

set.seed(2)
x <- rnorm(100, 30, 40) 
x[100] <- 200
x2 <- remove_outliers(x)

boxplot(cbind(x, x2))

PabloMBooster/fenix documentation built on Oct. 21, 2023, 8:22 p.m.