coalesce {BBmisc}R Documentation

Returns first non-missing, non-null argument.

Description

Returns first non-missing, non-null argument, otherwise NULL.

Usage

coalesce(...)

Arguments

...

[any]
Arguments.

Value

[any].

Examples

f = function(x,y) {
  print(coalesce(NULL, x, y))
}
f(y = 3)

[Package BBmisc version 1.9 Index]