Learn R Programming

rlang (version 1.3.0)

op-null-continuation: Default value for non-NULL

Description

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

op-null-default

Examples

Run this code
1 %&&% 2
NULL %&&% 2

Run the code above in your browser using DataLab