
Last chance! 50% off unlimited learning
Sale ends in
NULL
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.
x %||% y
If x
is NULL, will return y
; otherwise returns x
.
# NOT RUN {
1 %||% 2
NULL %||% 2
# }
Run the code above in your browser using DataLab