%??% {checkmate} | R Documentation |
Returns the left hand side if not missing nor NULL
, and
the right hand side otherwise.
lhs %??% rhs
lhs |
[any] |
rhs |
[any] |
Either lhs
or rhs
.
print(NULL %??% 1 %??% 2)
print(names(iris) %??% letters[seq_len(ncol(iris))])