Description Usage Arguments Examples
This function removes outliers from a vector and replaces them with an optional value based on sigma test or the interquartile range
1 2 3 4 5 6 7 |
v |
numeric vector |
type |
string, one of iqr for interquartile range or sigma for sigma test |
fill |
numeric or function, either a fixed value or a function such as mean from which the replacement values can be computed |
range |
numeric, this number is multiplied with the interquartile range for type = 'iqr' or the standard deviation for type = 'sigma' and determines the width of the window in which values are considered as NOT being outliers |
na.rm |
logical; if true, any NA and NaN's are removed from v before the quantiles, means or standard deviations are computed. |
1 | remove_outliers(c(1, 2, 3, 100))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.