Winsorize values at lower and upper quantiles.

snip(
  x,
  lower.quantile = 0.01,
  upper.quantile = 0.99,
  lower.cutoff = NA,
  upper.cutoff = NA,
  verbose = F
)

Arguments

x

Numeric vector

lower.quantile

lower quantile [0, 1]. Default = 0.01

upper.quantile

lower quantile [0, 1]. Default = 0.99

lower.cutoff

lower bound value to truncate data at. If specified, lower.quantile argument is ignored. Default = NA.

upper.cutoff

upper bound value to truncate data at. If specified, upper.quantile argument is ignored. Default = NA.

verbose

print truncation values. Default is F.

Author

Nicholas Mikolajewicz