Replaces the values in a numeric vector that are beyond the specified
quantiles with the boundary values of those quantiles. This is done for both
tails of the distribution based on the cut parameter.
Usage
winsorize(x, cut)
Value
A numeric vector with the extreme values replaced by the
corresponding quantile values.
Arguments
x
A numeric vector to be winsorized.
cut
The proportion of data to be winsorized from both ends of the
distribution. For example, a cut of 0.05 will winsorize the lowest and
highest 5% of the data. Must be inside [0, 0.5].