Learn R Programming

NOVA (version 0.1.1)

null_coalesce: Null Coalescing Operator

Description

Returns the left-hand side if not NULL, otherwise the right-hand side

Usage

null_coalesce(lhs, rhs)

Value

lhs if not NULL, otherwise rhs

Arguments

lhs

Left-hand side value

rhs

Right-hand side value (default/fallback)

Examples

Run this code
null_coalesce(5, 10)
null_coalesce(NULL, 10)

Run the code above in your browser using DataLab