| default | R Documentation |
a %||% b returns a unless it is empty, in which case
b is returned.
a %||% b
lhs %|% rhs
a |
the value to return if non-empty |
b |
default value |
lhs |
vector with potentially missing values, or |
rhs |
vector with default values, same length as |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.