find.outliers: Find outliers

Description Usage Arguments Details Value Examples

View source: R/outliers.R

Description

Return logical true where outliers are in a vector.

Usage

1
2
find.outliers(x, tail = "both", meth = "trim", probs = c(0.25, 0.75),
  sdn = 2, na.rm = TRUE, ...)

Arguments

x

A vector

tail

One of 'both', 'left', or 'right'

meth

One of 'trim', 'sd' or 'IQR'

probs

A 1 or 2 element numeric vector of probabilities

sdn

when meth = 'sd', number of standard deviations away from the mean to detect outlier

na.rm

A boolean whether to remove NA

Details

Each method will be described here in the future.

Value

A boolean vector where outliers outside of quantile(x,probs) (see details for individual methods) are true.

Examples

1
2
x <- rnorm(1000)
y <- find.outliers(x,probs=c(.01,.99))

dnacombo/MaxPac documentation built on Nov. 17, 2021, 3:36 a.m.