View source: R/dthelper-computation-functions.R
remove.outlier | R Documentation |
Changes outliers to NAs. Outliers are determined based on how far they are away from the mean. If they cross the specified threshold (default as 2 SDs away from mean), then its is treated as an outlier
remove.outlier(x, sd.away = 2, na.rm = T, print.outlier = TRUE)
x |
vector object |
sd.away |
Number of SDs away from mean. Used to compute threshold for outliers. |
na.rm |
If set to TRUE, NAs are ignored in computation |
print.outlier |
If set to TRUE, number of outliers will be printed |
vector object
set.seed(100) x <- rnorm(100) remove.outlier(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.