grapes-between-grapes: Check if elements are between two values

Description Usage Details Value

Description

This is a convenience syntax for the common pattern of 'x >= y & x <= z'. The right hand side can be supplied as a simple vector: e.x., 'x The min and max of the right hand side vector are used for the comparison, so the order of the elements in the vector doesn't matter. This also means you could use the function to succinctly find whether or not an element falls within the range of another vector.

Usage

1
x %between% y

Details

Both sides of the comparison are inclusive. For example, '1

Value

A logical vector indicating whether each element of the left hand side was between the min and max of the right hand side.


lukerobert/luketools documentation built on Jan. 24, 2020, 2:15 a.m.