This is valid:
data.table::fifelse(c(T, F, NA), 1L, 2.0, 3.0)
# [1] 1 2 3
But not this:
data.table::fifelse(c(T, F, NA), 1L, 2L, 3.0)
# Error in data.table::fifelse(c(T, F, NA), 1L, 2L, 3) :
# 'yes' is of type integer but 'na' is of type double. Please make sure that both arguments have the same type.
This is valid:
But not this: