Set outliers in a numeric vector to a specified percentile.

winsorize(x, q)

Arguments

x

Numeric vector to winsorize

q

Percentile to set from each end

Value

Winsorized numeric vector