[datatable-help] rbind() vs. rbindlist() behavior/warning
Eduard Antonyan
eduard.antonyan at gmail.com
Sat Nov 9 18:29:39 CET 2013
Fyi, it's not well documented, but setting use.names=FALSE in rbind would
replicate rbindlist behavior.
I think it's a reasonable FR - if/when all of rbind code goes into C, it
would be trivial to add.
On Nov 9, 2013 10:51 AM, "G See" <gsee000 at gmail.com> wrote:
> 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
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20131109/742700ec/attachment.html>
More information about the datatable-help
mailing list