%inRange% | R Documentation |
Return which values are in a certain range
%inRange%
indicates which values are in a certain range, including the
boundaries of the range.
lhs %inRange% rhs
lhs |
numeric vector. |
rhs |
numeric vector of length 2 with the bounds of the range. |
%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.
Mathijs Deen
%withinRange%
a <- seq(0, 100, 5)
r <- c(40, 70)
cbind(a,
'a %inRange% r' = a %inRange% r,
'a %withinRange% r' = a %withinRange% r)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.