[datatable-help] rbind() vs. rbindlist() behavior/warning
G See
gsee000 at gmail.com
Sat Nov 9 17:50:48 CET 2013
Hi,
Please note the inconsistency between the behavior of rbind() and
rbindlist() below.
m1 <- as.data.table(mtcars)
m2 <- copy(m1)
rbind(m1[, .SD[1], by=cyl], m2) # Gives warning and binds by name
rbindlist(list(m1[, .SD[1], by=cyl], m2)) # no warning, and does NOT
bind by name
What do you think about making them have the same behavior and/or
warning? Personally, I prefer the behavior of rbind(), and would
prefer to see a warning if column names are ignored like they are with
rbindlist().
Thanks,
Garrett
More information about the datatable-help
mailing list