null-default: Default value for 'NULL'.

Description Usage Arguments Examples

Description

This infix function makes it easy to replace 'NULL's with a default value. It's inspired by the way that Ruby's or operation ('||') works.

Usage

1
x %||% y

Arguments

x, y

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

Examples

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

metrumresearchgroup/rrsq documentation built on Aug. 20, 2021, 3:20 p.m.