default.var {StabPerf} | R Documentation |
Returns current value of a variable, otherwise default value
Description
Returns value of given variable when not null. When null, checks for a default value, if provided and returns that instead. Uses call-by-reference semantics.
Usage
default.var(var, default=NULL)
Arguments
var |
Variable to be tested against is.null or is.na |
default |
Default value to return when var undefined. |
Details
If var
and default
are both undefined, NULL
is returned.
Value
Examples
default.var(var, "default value")
[Package
StabPerf version 0.5
Index]