Learn R Programming

openxlsx (version 4.2.4)

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
# NOT RUN {
x <- NULL
x <- x %||% "none"
x <- x %||% NA
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab