Learn R Programming

adaptr (version 1.4.0)

replace_null: Replace NULL with other value (NULL-OR-operator)

Description

Used internally, primarily when working with list arguments, because, e.g., list_name$element_name yields NULL when unspecified.

Usage

a %||% b

Value

If a is NULL, b is returned. Otherwise a is returned.

Arguments

a, b

atomic values of any type.