%||%
If length-0 alternative operator
Arguments
- a
ANY. Element to select only if it is not length 0
- b
ANY. Element to select if
a
is length 0
Examples
6 %||% 10
#> [1] 6
character() %||% "hi"
#> [1] "hi"
NULL %||% "hi"
#> [1] "hi"
%||%
If length-0 alternative operator
ANY. Element to select only if it is not length 0
ANY. Element to select if a
is length 0
6 %||% 10
#> [1] 6
character() %||% "hi"
#> [1] "hi"
NULL %||% "hi"
#> [1] "hi"