coalesce: Returns first non-missing, non-null argument.

Description Usage Arguments Value Examples

View source: R/coalesce.R

Description

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

We have to perform some pretty weird tryCatch stuff internally, so you should better not pass complex function calls into the arguments that can throw exceptions, as these will be completely muffled, and return NULL in the end.

Usage

1

Arguments

...

[any]
Arguments.

Value

[any].

Examples

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

berndbischl/BBmisc documentation built on Nov. 29, 2017, 5:10 a.m.