scaleOutlier: Robust scaling

View source: R/scaleOutlier.R

scaleOutlierR Documentation

Robust scaling

Description

Robust scaling of a numeric vector

Usage

scaleOutlier(
  x,
  center = "median",
  scale = "mad",
  method,
  na.rm = FALSE,
  noScaleIf0 = FALSE,
  ...
)

Arguments

x

a numeric vector

center

the method used to assess the "average" value

scale

the method used to assess the dispersion of the data

method

a method taking the dataset as its first argument and returning first the center and then the scale value. Disregarded if arguments center and scale are not null.

na.rm

should missing values be omitted

noScaleIf0

If TRUE the variable will not be scaled if its dispersion is null.

...

additional arguments passed to method

Value

the scaled vector

Examples

n <- 1e3
scaleOutlier(rnorm(n))


bozenne/butils documentation built on Oct. 14, 2023, 6:19 a.m.