winsorize: Winsorize or trim variables

Description Usage Arguments Value

View source: R/data_preparation.R

Description

Winsorize or trim variables

Usage

1
winsorize(X, bounds, trim = FALSE)

Arguments

X

numeric: vector to be winsorized or trimmed

bounds

double: vector of winsorizing minimum and maximum bounds, c(min percentile, max percentile)

trim

boolean: if TRUE then replace outliers with NA instead of winsorizing bound

Value

numeric vector of winsorized or trimmed values


tylerJPike/OOS documentation built on March 20, 2021, 3:20 a.m.