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
Rbindlist doesn't accept both use.names = FALSE and fill = TRUE, it automatically changes use.names = TRUE, which is not my desired behaviour. I would like
x
y
1
A
bound with
z
4
to give
x
y
1
A
4
NA
library(data.table)
l1 <- list(data.table(x = 1, y = "A"), data.table(z = 4))
l1
# what I want
data.table(x = c(1,4), y = c("A", NA))
rbindlist(l1, fill = T) # works but 3 columns
rbindlist(l1, use.names = FALSE) # doesn't work :
# Item 2 has 1 columns,
# inconsistent with item 1 which has 2 columns.
# To fill missing columns use fill=TRUE
rbindlist(l1, use.names = FALSE, fill = TRUE) # back to case 1
# use.names= cannot be FALSE when fill is TRUE. Setting use.names=TRUE.
The warning after rbindlist(l1, use.names = FALSE) recommending to add fill = TRUE is misleading because then it won't work.
The text was updated successfully, but these errors were encountered:
Hello,
Rbindlist doesn't accept both
use.names = FALSE
andfill = TRUE
, it automatically changesuse.names = TRUE
, which is not my desired behaviour. I would likebound with
to give
The warning after
rbindlist(l1, use.names = FALSE)
recommending to addfill = TRUE
is misleading because then it won't work.The text was updated successfully, but these errors were encountered: