ifelse1 should warn, by default, when the longer object is not a multiple of length of the shorter object, as in usual R functions.
Example:
ifelse1(rep(TRUE,5), 1:4, 1:5*10)
[1] 1 2 3 4 1
I would prefer:
ifelse1(rep(TRUE,5), 1:4, 1:510)
[1] 1 2 3 4 1
Warning message:
In ifelse1(rep(TRUE,5), 1:4, 1:510):
longer object length is not a multiple of shorter object length
ifelse1 should warn, by default, when the longer object is not a multiple of length of the shorter object, as in usual R functions.
Example:
I would prefer: