Description Usage Arguments Details Value Author(s) See Also Examples
Operators for checking if value is within a given interval or subset.
| 1 2 3 4 5 6 7 8 9 | x %in{}% subset
x %in[]% interval
x %in()% interval
x %in(]% interval
x %in[)% interval
 | 
| x | vector or array of values to be matched. | 
| subset | vector or list of values to be matched against. | 
| interval | vector with two elements defining an interval range. | 
Parenthesss of each operator define how the subset is specified:
%in{}% - lists all elements of the subset
%in[]% - subset specified as an closed interval
%in()% - subset specified as a open interval
%in(]% - interval that is open on the left and closed on the right
%in[)% - interval that is closed on the left and open on the right
The %in{}% operator is a reimplementation of %in% that
preserves the dimensions of x (see examples).
The operations using intervals are a convenient short hand forx > interval[1] & x < interval[2].
The idea for function names is taken from the package DescTools by Andri Signorell.
a logical vector or an array of the same dimensions as x
indicating if each value of x is within the defined subset.
Karolis Koncevičius
| 1 2 3 4 5 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.