%||% (if length-0) alternative operator
Arguments
- a
(
ANY)
element to select only if it is not of length 0.- b
(
ANY)
element to select ifahas 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 of length 0.
(ANY)
element to select if a has length 0.
6 %||% 10
#> [1] 6
character() %||% "hi"
#> [1] "hi"
NULL %||% "hi"
#> [1] "hi"