Description Usage Arguments See Also Examples
Detect and remove outliers, as defined by quantile probabilities.
1 2 3 | detect_outliers(x, probs, na.rm = FALSE, incbounds = TRUE)
rm_outliers(df, ..., probs = c(0.025, 0.975), na.rm = FALSE, incbounds = TRUE)
|
x |
a numeric vector. |
probs |
for |
na.rm |
logical, whether to remove |
incbounds |
logical, whether boundary values should be interpreted as inclusive. See |
df |
a |
... |
quoted column names in which to search for outliers, or a vector of column names. |
1 2 3 4 5 6 7 | df <- data.frame(num1 = 1:1e3, num2 = sample(1:1e3))
df$num1[detect_outliers(df$num1, probs = c(0.025, 0.975))]
identical(rm_outliers(df, c("num1", "num2")),
rm_outliers(df, "num1", "num2")
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.