R/utilities-conditional.R
ifEqual.Rd
Short-key checking if arguments 1 and 2 are equal, output argument 3 if equal, or output argument 4 otherwise.
ifEqual(x, y, outputIfEqual, outputIfNotEqual = NULL)
argument 1
argument 2
argument 3
argument 4
ifEqual(1, 1, "x", "y") # "x" #> [1] "x" ifEqual(1, 2, "x", "y") # "y" #> [1] "y"