btwn: Check if some values are covered by the range of the values...

%btwn%R Documentation

Check if some values are covered by the range of the values in a second vector

Description

Tests whether values in x are between the minimum and maximum of y.

Usage

x %btwn% y

Arguments

x

[numeric(n)]
Value(s) that should be within the range of y.

y

[numeric]
Numeric vector which defines the range.

Value

[logical(n)]. For each value in x: Is it in the range of y?

Examples

x = 3
y = c(-1,2,5)
x %btwn% y

BBmisc documentation built on Nov. 6, 2026, 1:06 a.m.