out_threshold: Detect outliers with upper and lower threshold

Description Usage Arguments Value Examples

View source: R/04-outliers.R

Description

Maturing lifecycle

Usage

1
out_threshold(x, tlow = NULL, thigh = NULL, fill = NA)

Arguments

x

[univariate vector]

Univariate vector, numeric or ts object with only one dimension.

tlow

[numeric(1): NULL]

The lower threshold.

thigh

[numeric(1): NULL]

The upper threshold.

fill

[numeric or function: NA]

Numeric value(s) or function used to fill observations.

Value

Returns a vector with the same class and attributes as the input vector.

Examples

1
2
3
x <- c(1, 3, -1, 5, 10, 100)
out_threshold(x, tlow = 0, fill = 0)
out_threshold(x, thigh = 9, fill = function(x) quantile(x, 0.9))

kvasilopoulos/transx documentation built on Jan. 26, 2021, 6:14 p.m.