in_range(x, range) is TRUE where range[1] <= x and x <= range[2],
element by element, and NA where x is NA. The bounds are inside the
range. range is a range entry of the dictionary, as in
in_range(do_mean, dict$do_band), or any two numbers in order.
Arguments
- x
A number or a quantity (a
unitsvalue, seeu()).- range
Two numbers, lower first; a
unitspair for a quantity.
Details
A quantity x is converted to the unit of the range. Units that do not
convert, a number against a range with a unit (or the reverse), and a
range that is not two numbers with the lower below the upper are a
weft_value_error. It is an R function: the filter has no dictionary, so
it is written in a governor's if where R evaluates it.