%inRange% {MDMA}R Documentation

inRange

Description

Return which values are in a certain range %inRange% indicates which values are in a certain range, including the boundaries of the range.

[Experimental]

Usage

lhs %inRange% rhs

Arguments

lhs

numeric vector.

rhs

numeric vector of length 2 with the bounds of the range.

Value

%inRange% returns a logical vector of length(lhs), indicating which values of lhs are and are not in range rhs. Boundaries of rhs are included.

Author(s)

Mathijs Deen

See Also

%withinRange%

Examples

a <- seq(0, 100, 5)
r <- c(40, 70)
cbind(a,
      'a %inRange% r' = a %inRange% r,
      'a %withinRange% r' = a %withinRange% r)

[Package MDMA version 1.1.0 Index]