extremes | R Documentation |
Identify high improbable values using a percentile threshold
extremes(vec, threshold = 99.5)
vec |
Vector |
threshold |
Threshold in percentile expressed between 1 to 100, defaults to 99.5 |
Return a logical vector indicating TRUE if value is above the percentile threshold
vec <- c(1:10, 10000)
extremes(vec)
vec[extremes(vec)]
data.frame(vec = vec) %>% filter(!extremes(vec))
data.frame(vec = vec) %>% filter(extremes(vec))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.