View source: R/remove_outliers.R
remove_outliers | R Documentation |
Remove outliers from a data vector
remove_outliers(x, na.rm = TRUE, ...)
x |
|
na.rm |
|
... |
Determine if that point is further than 1.5 * IQR away from the mean. If so, that point is an outlier and should be eliminated from the data resulting in a new set of data.
Pablo Marin
set.seed(2)
x <- rnorm(100, 30, 40)
x[100] <- 200
x2 <- remove_outliers(x)
boxplot(cbind(x, x2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.