<div dir="ltr">This is by design, and is not a bug.<div><br></div><div>If you try<br></div><div><div><br></div><div>    data.table:::.rbind.data.table(NULL, NULL)</div><div><br></div><div>in version 1.8.10 you will also get a 0-size data.table in agreement with rbindlist (if you try the above in the very latest version, you will get an error, and I may change that to be same as 1.8.10 - but it doesn't matter much, as you can't get there unless you use ":::", and then all bets are off anyway). Both are supposed to always return data.tables.</div>

<div><br></div><div>The reason you're getting something else with rbind(NULL, NULL) is because those NULL's are not data.tables, so a *different* rbind is called, which has nothing to do with data.table.</div></div>

<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Oct 29, 2013 at 12:47 PM, Chris Neff <span dir="ltr"><<a href="mailto:caneff@gmail.com" target="_blank">caneff@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Simple thing:<div><br></div><div>dt <- rbindlist(list(NULL, NULL)) #dt is a data.table with 0 rows and columns</div>

<div><br></div><div>is.null(dt) # Prints false</div><div><br></div><div>d <- rbind(NULL, NULL)  #d is NULL</div>

<div><br></div><div>is.null(d) # Prints true</div><div><br></div><div><br></div><div>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. </div>



<div><br></div><div>Is this working as intended? Or should I file a bug?</div></div>
<br>_______________________________________________<br>
datatable-help mailing list<br>
<a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br></blockquote></div><br></div>