default | R Documentation |
Returns a default value for a scalar, to be used when the input is NA, NULL or has a length of 0.
default(x, default_value)
x |
A value |
default_value |
The replacement value for when x is NA, NULL or has a length of 0. |
The value of x when x is not NA, NULL or has a length of 0, and default_value otherwise.
default(NA, 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.