powered by
If the focal input is TRUE, replace it with alternative.
TRUE
iftrue(x = TRUE, alt = NULL)
x if not TRUE, alt otherwise.
x
alt
Focal input.
Alternative value.
iftrue() iftrue(TRUE, 1) iftrue(2, 1) iftrue(FALSE, 1)
Run the code above in your browser using DataLab