default {hgutils} | R Documentation |
Default value
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)
Arguments
x |
A value |
default_value |
The replacement value for when x is NA, NULL or has a length of 0. |
Value
The value of x when x is not NA, NULL or has a length of 0, and default_value otherwise.
Examples
default(NA, 0)
[Package hgutils version 0.2.19 Index]