powered by
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.
`||`
a %||% b
If a is NULL, will return b; otherwise returns a.
a
b
# NOT RUN { 1 %||% 2 # returns 1 NULL %||% 2 # returns 2 # }
Run the code above in your browser using DataLab