defaultIfNULL | R Documentation |
Return the given object or a default value if the object is NULL
defaultIfNULL(x, default, count = FALSE)
x |
R object to be checked for NULL |
default |
default value that is returned if |
count |
if |
x
if x
is not NULL and default
otherwise
defaultIfNA, defaultIfZero
defaultIfNULL(NULL, "default") # returns the default value
defaultIfNULL("actual", "default") # returns the "actual" value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.