vec.removeOLs: Remove outlying observations from a vector

View source: R/faststats.R

vec.removeOLsR Documentation

Remove outlying observations from a vector

Description

Remove outlying observations from a vector

Usage

vec.removeOLs(x, s = 3, make.na = FALSE)

Arguments

x

Vector to remove outliers from

s

If a value deviates more SDs from the mean than this value, it is marked as an outlier

make.na

If FALSE, excludes the outliers. If TRUE, replaces them with NA.

Value

A vector with outliers removed or replaced with NA.

Author(s)

Sercan Kahveci

See Also

[removeOLs()]

Examples

testvec <- c(1,3,5,7,9,11,13,15,17,19,100000)
vec.removeOLs(testvec)
vec.removeOLs(testvec,make.na=TRUE)


Spiritspeak/skMisc documentation built on April 12, 2025, 5:40 a.m.