null_coalesce | R Documentation |
Returns the first argument if it is not NULL or empty, otherwise returns the second argument.
x %||% y
x |
An object to test if NULL or empty |
y |
An object to return if x is NULL or empty |
Returns x if x is not NULL, not empty, or not a missing XML node, otherwise returns y.
NULL %||% "default" # returns "default"
"value" %||% "default" # returns "value"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.