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

Description Usage Arguments Examples

View source: R/between.R

Description

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

Usage

1
between.(x, left, right)

Arguments

x

A numeric vector of values

left, right

Boundary values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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))

mtfairbanks/gdt documentation built on May 4, 2021, 9:44 a.m.