Learn R Programming

openxlsx (version 4.2.7.1)

if_null_then: If NULL then ...

Description

Replace NULL

Usage

x %||% y

Arguments

x

A value to check

y

A value to substitute if x is null

Examples

Run this code
if (FALSE) {
x <- NULL
x <- x %||% "none"
x <- x %||% NA
}

Run the code above in your browser using DataLab