[datatable-help] rbindlist(x) doesn't behave like rbind for all null lists

Chris Neff caneff at gmail.com
Tue Oct 29 18:47:25 CET 2013


Simple thing:

dt <- rbindlist(list(NULL, NULL)) #dt is a data.table with 0 rows and
columns

is.null(dt) # Prints false

d <- rbind(NULL, NULL)  #d is NULL

is.null(d) # Prints true


I would expect the two to be equivalent.  This bit me when I was relying on
!is.null(dt) before assigning other columns in the data.table.  rbindlist
should return NULL in this case I would think.

Is this working as intended? Or should I file a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20131029/077d5419/attachment.html>


More information about the datatable-help mailing list