Operator Providing Alternative to Zero-Length Object
op-zero-length.RdInfix function implementing provision of an alternative if an object has zero length.
Arguments
- x, y
atomic vector arguments or other objects for which
length()is defined.
Details
The infix function %L% may be useful in implementing if (length(x)) x else y and
was inspired by the null coalescing operator %||%.
See also
%||%.