coalesce(list(1, NA), list(NA, 2))
# The first argument is a list, data.table or data.frame. In this case there should be no other arguments provided.
is a result of API improvement implemented in 1f0bcc7 where x and ... has been merged into single input argument.
We should decide if we want to keep that improvement or be consistent to hutils/dplyr, and go back to distinct input argument x and ....
coalesce(list(c(1, NA), c(NA, 2)))
# 1 2
there is no gain for being consistent to dplyr/hutils in this case as they do nothing, this is related to point 1 above.
never heard about tidy dots, could anyone provide a reference to R manual? or is it tidyverse-only feature?
AFAIU we already handle same input that dplyr requires !!!, this is related to point 1 above, where we merge x and ....
#Error in coalesce(1:2, 1:3) : Item2islength3butthefirstitemislength2.Onlysingletonsarerecycled.
error, as it is now, it is definitely better, same as dplyr, unlike hutils
being consistent to dplyr/hutils here doesn't seem to be great, they result into NAs. Ideally would be to merge factor levels. I would say current DT behaviour is acceptable, if we want to change this we should merge levels.