near_middle | R Documentation |
Return the middle x percent of values
near_middle(x, middle, within)
x |
numeric vector |
middle |
percentage you want to center around |
within |
percentage around center |
logical vector
x <- runif(20)
near_middle(x = x,
middle = 0.5,
within = 0.2)
library(dplyr)
heights %>% features(height_cm, list(min = min)) %>%
filter(near_middle(min, 0.5, 0.1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.