which_outliers: Find the outliers in a dataset 'which_outliers'

View source: R/Func_Misc.R

which_outliersR Documentation

Find the outliers in a dataset which_outliers

Description

Find the outliers in a dataset which_outliers

Usage

which_outliers(x, na.rm = TRUE, probs = c(0.5, 0.95), ...)

Arguments

x

dataset

na.rm

Whether ignore the na value.

probs

Range of non-outlier range

...

More options in quatile();

Value

Index of the outliers

Examples

set.seed(1)
x <- rnorm(100)
x <- c(-10, x, 10)
id <- which_outliers(x, probs=c(0.05,0.95))
y = x
y[id]=NA
par(mfrow = c(1, 2))
boxplot(x, ylim=range(x))
boxplot(y, ylim=range(x))
par(mfrow=c(1,1))

SHUD-System/SHUDtoolbox documentation built on Nov. 27, 2024, 5:54 a.m.