Description
Returns a default value for a scalar, to be used when the input is NA, NULL or has a length of 0.
Usage
default(x, default_value)
Value
The value of x when x is not NA, NULL or has a length of 0, and default_value otherwise.
Arguments
- x
A value
- default_value
The replacement value for when x is NA, NULL or has a length of 0.