h_default_if_empty | R Documentation |
A simple helper function that sets a default value for an empty or missing object,
that is an object for which length()
function returns 0L
or it has length 1
and is.na()
returns TRUE
.
h_default_if_empty(x, default)
x |
( |
default |
( |
h_default_if_empty(character(0), default = "default label")
h_default_if_empty("custom label", default = "default label")
h_default_if_empty(NA, default = "default label")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.