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

op-null-continuationR Documentation

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

1 %&&% 2
NULL %&&% 2

rlang documentation built on April 6, 2026, 5:07 p.m.