Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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

1 %iff% 2
NULL %iff% 2

SeuratObject

Data Structures for Single Cell Data

v4.0.1
GPL-3
Authors
Rahul Satija [aut] (<https://orcid.org/0000-0001-9448-8833>), Andrew Butler [aut] (<https://orcid.org/0000-0003-3608-0463>), Paul Hoffman [aut, cre] (<https://orcid.org/0000-0002-7693-8957>), Tim Stuart [aut] (<https://orcid.org/0000-0002-3044-0897>), Jeff Farrell [ctb], Shiwei Zheng [ctb] (<https://orcid.org/0000-0001-6682-6743>), Christoph Hafemeister [ctb] (<https://orcid.org/0000-0001-6365-8254>), Patrick Roelli [ctb], Yuhan Hao [ctb] (<https://orcid.org/0000-0002-1810-0822>)
Initial release
2021-05-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.