Skip to content

This infix operator is the conceptual opposite of %||%, providing a fallback only if x is defined.

Usage

x %&&% y

Arguments

x, y

If x is NULL, will return x; otherwise returns y.

See also

Examples

1 %&&% 2
#> [1] 2
NULL %&&% 2
#> NULL