Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

between..html

Do the values from x fall between the left and right bounds?


Description

between.() utilizes data.table::between() in the background

Usage

between.(x, left, right)

Arguments

x

A numeric vector of values

left, right

Boundary values

Examples

between.(1:10, 5, 7)

test_df <- data.table(
  x = sample(1:5, 10, replace = TRUE),
  y = sample(1:5, 10, replace = TRUE)
)

# Typically used in a filter.()
test_df %>%
  filter.(between.(x, 1,3))

# Can also use the %between% operator
test_df %>%
  filter.(x %between% c(1, 3))

tidytable

Tidy Interface to 'data.table'

v0.6.1
MIT + file LICENSE
Authors
Mark Fairbanks [aut, cre], Abdessabour Moutik [ctb], Matt Carlson [ctb], Ivan Leung [ctb], Ross Kennedy [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.