| plotr_utils | R Documentation |
Some utilities for plotr.
x %ni% table
x %inside% interval
a %||% b
x |
vector or |
table |
vector or |
interval |
numeric vector of length two representing the interval |
a, b |
raw, logical, "number-like" vectors or objects |
%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.
%in%, ||
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.