Description Arguments Value See Also Examples
This function provides a functional approach for a specific use case of conditional expressions: that of applying default values when a variable is not well-formed. In this context, well-formedness is considered to be any scalar value that is not NA. By encapsulating this behavior in a function, referential transparency is preserved.
x |
a scalar variable |
default |
the value to replace empty, NULL, or NA |
A well-formed value, either the original value or the default if x is not well-formed.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.