You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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] 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 ....
coalesce(1:2, 1:3)
#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.
Activity
jangorecki commentedon Jul 29, 2019
differences reported in tweet:
is a result of API improvement implemented in 1f0bcc7 where
xand...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
xand....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 mergexand....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.
fcoalesce of type list (#3712) link added to news item
jangorecki commentedon Jun 17, 2020
related change coming to dplyr tidyverse/dplyr#5334