op-null-default {rlang} | R Documentation |
Default value for NULL
Description
This infix function makes it easy to replace NULL
s with a default
value. It's inspired by the way that Ruby's or operation (||
)
works.
Usage
x %||% y
Arguments
x , y |
If |
Examples
1 %||% 2
NULL %||% 2
[Package rlang version 1.1.4 Index]