adjust_outlier: Adjust outliers

View source: R/utils.R

adjust_outlierR Documentation

Adjust outliers

Description

Adjust outliers

Usage

adjust_outlier(x, q = 0.05)

Arguments

x

A numeric vector.

q

Percentile to adjust.

Details

Vaules larger than percentile 1 - q are adjusted to the 1 - q percentile and values smaller than percentile q are adjusted to the q percentile

Value

A numeric vector with same length as the original one.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

set.seed(123)
x = rnorm(40)
x[1] = 100
adjust_outlier(x)

jokergoo/cola documentation built on Feb. 29, 2024, 1:41 a.m.