Learn R Programming

SeuratObject (version 4.0.1)

set-if-null: Set a default value depending on if an object is NULL

Description

These objects are imported from other packages. Follow the links below to see their documentation.

rlang

%||%

Usage

x %iff% y

Arguments

x

An object to test

y

A default value

Value

For %||%: y if x is NULL otherwise x

For %iff%: y if x is not NULL; otherwise x

Examples

Run this code
# NOT RUN {
1 %||% 2
NULL %||% 2

1 %iff% 2
NULL %iff% 2

# }

Run the code above in your browser using DataLab