near_middle: Return the middle x percent of values

View source: R/nearests.R

near_middleR Documentation

Return the middle x percent of values

Description

Return the middle x percent of values

Usage

near_middle(x, middle, within)

Arguments

x

numeric vector

middle

percentage you want to center around

within

percentage around center

Value

logical vector

Examples

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))
            

brolgar documentation built on June 22, 2024, 11:24 a.m.