nulldefault: Set default value

%or%R Documentation

Set default value

Description

If a is not null, return a. Otherwise, return b.

Usage

a %||% b

Arguments

a

an object

b

an object

Examples

a <- "a"
b <- "b"
d <- a %or% b # d == "a"
a <- NULL
d <- a %or% b # d == "b"

nachocab/clickme documentation built on Nov. 11, 2023, 3:14 p.m.