a %||% b
returns a
unless it is empty, in which case
b
is returned.
a %||% blhs %|% rhs
a %||% b
returns a
, unless it is NULL
, empty,
FALSE
or ""
; in which case b
is returned.
lhs %|% rhs
returns a vector of the same length as
rhs
with all missing values in lhs
replaced by the
corresponding values in rhs
.
the value to return if non-empty
default value
vector with potentially missing values, or NULL
vector with default values, same length as lhs
unless that
is NULL