iftrue: Replace if TRUE

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

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

Usage

1
iftrue(x = TRUE, alt = NULL)

Arguments

x

Focal input.

alt

Alternative value.

Value

x if not TRUE, alt otherwise.

Examples

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

weecology/LDATS documentation built on March 28, 2020, 11:20 a.m.