%withinRange% {MDMA}R Documentation

withinRange

Description

Return which values are within a certain range

%withinRange% indicates which values are in a certain range, excluding the boundaries of the range.

[Experimental]

Usage

lhs %withinRange% rhs

Arguments

lhs

numeric vector.

rhs

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

Value

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

Author(s)

Mathijs Deen

See Also

%inRange%

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]