R/utils.R
null-coalescing.Rd
Returns x if not NULL, otherwise y.
x
y
x %||% y
Value to check
Default value if x is NULL
x if not NULL, otherwise y
NULL %||% "default" # returns "default" #> [1] "default" "value" %||% "default" # returns "value" #> [1] "value"