winsorize: Winsorize or trim variables
Description
Winsorize or trim variables
Usage
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