which_outliers: Find the outliers in a dataset 'which_outliers'

Description Usage Arguments Value Examples

View source: R/Func_Misc.R

Description

Find the outliers in a dataset which_outliers

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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))

happynotes/PIHMgisR documentation built on Jan. 25, 2020, 9:51 p.m.