winsorize: Winsorize outliers

View source: R/deepOutlier.r

winsorizeR Documentation

Winsorize outliers

Description

winsorize sets outliers to low and high border values.

Usage

winsorize(
  x,
  minx = NULL,
  maxx = NULL,
  probs = c(0.05, 0.95),
  na.rm = FALSE,
  type = 7
)

Arguments

x

A numeric vector to be winsorized.

minx

The low border value, all values within x being lower than this value will be replaced by this value. By default, this value is set to the 5% quantile of x.

maxx

The high border value, all values within x being higher than this value will be replaced by this value. By default, this value is set to the 95% quantile of x.

probs

A numeric vector of probabilities with values in 0,1 as used in quantile.

na.rm

A logical value indicating whether missing values should be omitted or not (default) to calculate the quantiles.

type

An integer between 1 and 9 selecting one of the nine quantile algorithms detailed in quantile to be used.

Value

A vector of the same length as x containing the winsorized values.

See Also

quantile, outlier.

Other Outlier: outlier(), outlier_dataset()


stschn/deepANN documentation built on June 25, 2024, 7:27 a.m.