winsorize: Outliers: Winsorize

View source: R/outliers.R

winsorizeR Documentation

Outliers: Winsorize

Description

Winsorizing a vector means that a predefined quantum of the smallest and/or the largest values are replaced by less extreme values. Thereby the substitute values are the most extreme retained values.

Usage

winsorize(x, thresh = c(0.05, 0.95), na.rm = FALSE)

Arguments

x

Numeric vector. Distribution to be winsorized.

thresh

Numeric vector. Lower and upper quantiles thresholds. Set values within [0,1].

na.rm

Boolean. Should NA be omitted to calculate the quantiles? Note that NA in x are preserved and left unchanged anyway.

Value

Numeric vector transformed.

See Also

Other Outliers: outlier_turkey(), outlier_zscore_plot(), outlier_zscore()


lares documentation built on Nov. 5, 2023, 1:09 a.m.