[a,b]
R/numerical-comparisons.R
inRange.Rd
Default values of a=0; b=1 allow for quick test if x is a probability.
a=0; b=1
x
inRange(x, a = 0, b = 1)
values to be tested
lower bound (default 0)
upper bound (default 1)
Logical vectors. NA values in x are retained.
NA
Alex Chubaty
set.seed(100) x <- stats::rnorm(4) # -0.50219235 0.13153117 -0.07891709 0.88678481 inRange(x, 0, 1) #> [1] FALSE TRUE FALSE TRUE