if_null: If null ...

Description Usage Arguments Value

View source: R/utils.R

Description

Returns a function or value if the 'object' is null, otherwise the original the 'object' . Useful in functions when default values are provided for arg = NULL

Usage

1
if_null(object, when_null)

Arguments

object

The object to evaluate is.null

when_null

An object, value, or code to evaluate when object is NULL

Value

A non-NULL 'object' or 'when_null' if 'object' is NULL


jmbarbone/qpm documentation built on July 25, 2020, 10:41 p.m.