iftrue: Replace if TRUE

View source: R/utilities.R

iftrueR Documentation

Replace if TRUE

Description

If the focal input is TRUE, replace it with alternative.

Usage

iftrue(x = TRUE, alt = NULL)

Arguments

x

Focal input.

alt

Alternative value.

Value

x if not TRUE, alt otherwise.

Examples

 iftrue()
 iftrue(TRUE, 1)
 iftrue(2, 1)
 iftrue(FALSE, 1)


LDATS documentation built on Sept. 19, 2023, 5:08 p.m.