R/utilities.R
iftrue.Rd
If the focal input is TRUE, replace it with alternative.
TRUE
iftrue(x = TRUE, alt = NULL)
Focal input.
Alternative value.
x if not TRUE, alt otherwise.
x
alt
iftrue() iftrue(TRUE, 1) iftrue(2, 1) iftrue(FALSE, 1)