powered by
%||%
%||% (if length-0) alternative operator
a %||% b
a if it is not of length 0, otherwise b.
a
b
(ANY) element to select only if it is not of length 0.
ANY
(ANY) element to select if a has length 0.
6 %||% 10 character() %||% "hi" NULL %||% "hi"
Run the code above in your browser using DataLab