As default, this function replaces the outliers with NA
. Setting the
replace_with_na
setting to FALSE
will remove the outliers from a vector,
and thus return a shorter vector. Works also within a pipe structure (%>%
).
1 2 | data$x <- remove_outliers(data$x)
data <- data %>% mutate(x_no_outliers = remove_outliers(x))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.