plotr_utils: plotr utils

plotr_utilsR Documentation

plotr utils

Description

Some utilities for plotr.

Usage

x %ni% table

x %inside% interval

a %||% b

Arguments

x

vector or NULL; the values to be matched

table

vector or NULL; the values to be matched against

interval

numeric vector of length two representing the interval

a, b

raw, logical, "number-like" vectors or objects

Details

%ni% is the negation of %in%.

%inside% returns a logical vector indicating if x is inside the interval (inclusive).

%||% is useful for a function, f, that may return a value or NULL, but if NULL is the result of f, it is desirable to return some other default value without errors.

See Also

%in%, ||

Examples

1:5 %ni% 3:5

c(0,4) %inside% c(0, 4)
-5:5 %inside% c(0, 5)
-5:5 %inside% c(5, 0)

# NULL || TRUE ## error
NULL %||% TRUE ## TRUE

raredd/plotr documentation built on Nov. 19, 2023, 4:09 a.m.