ifNotNull: Shortkey checking if argument 1 is not 'NULL', output the...

View source: R/utilities.R

ifNotNullR Documentation

Shortkey checking if argument 1 is not NULL, output the argument 2 if not null, or output argument 3 otherwise

Description

Check if condition is not NULL, if so output outputIfNotNull, otherwise, output outputIfNull.

Usage

ifNotNull(condition, outputIfNotNull, outputIfNull = NULL)

Arguments

condition

argument 1

outputIfNotNull

argument 2

outputIfNull

argument 3

Value

outputIfNotNull if condition is not NULL, outputIfNull otherwise.

Examples

ifNotNull(NULL, "x")
ifNotNull(NULL, "x", "y")
ifNotNull(1 < 2, "x", "y")


ospsuite.utils documentation built on March 18, 2022, 6:44 p.m.