snip: Winsorize values at lower and upper quantiles.

View source: R/utility_functions.R

snipR Documentation

Winsorize values at lower and upper quantiles.

Description

Winsorize values at lower and upper quantiles.

Usage

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(s)

Nicholas Mikolajewicz


NMikolajewicz/scMiko documentation built on June 28, 2023, 1:41 p.m.