op-null-default: Default value for 'NULL'

op-null-defaultR Documentation

Default value for NULL

Description

Convenience function to avoid testing for NULL.

Usage

x %||% y

Arguments

x, y

If x is NULL, will return y; otherwise returns x.

Value

The first object if it is not NULL otherwise the second object.

Examples

1 %||% 2
NULL %||% 2


ospsuite.utils documentation built on March 18, 2022, 6:44 p.m.