op-null-continuation {rlang}R 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

[Package rlang version 1.2.0 Index]