Description Usage Arguments Value Examples
Outliers are detected if it is larger than Q3 + lambda * (Q3-Q1) or smaller than Q1 - lambda * (Q3-Q1), where Q3 and Q1 are the third and first quantile of x
.
1 | find_outlier(x, lambda = 1.5)
|
x |
A numeric vector. |
lambda=1.5, |
a number decribes the "distance" from the group |
A list contains a character vector names is_outlier
that indicates whether it is outier ("yes", "no"), and a numeric vector named "bounds" that stores the upper cutting line and lower cutting line.
1 2 3 4 | x = rnorm(100, 0, 1)
idx = c(1, 5, 10, 21, 30)
x[idx] = x[idx] + 5
find_outlier(x, lambda = 1.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.