r - Error when using rbind to merge data.tables and one of them is empty -


Three (or more) data with RBID. An error is issued while merge Tuberge and an empty data is qualified between two non-empty data. TB:

  & gt; Loading Required (Data Eligible) Required Package: data.table data.table 1.9.2 for Support Type: Help ("Data Eligible") & gt; DT & LT; - Data suitable (x = c (1,2,3)) gt; RBIDID (DT, Data.W., DT) Error in Setclaimer (TT, CMH (match.name, make name (original.name [x]], (& lt; text & gt; # 1) : The column number is out of new order limits: NA   

This does not happen when the empty figure is in the end:

 > RBID (DT, DT, DatataHable ()) x 1: 1 2: 2 3: 3 4: 1 5: 2 6: 3   

But some other error occurs when empty data Accessible startup:

  & gt; RBIDID (data) Eligibility in the data (), DT, DT) Data: Rbind.data.table (...) (& lt; text & gt; # 1): In the colnames of some colnames of the argument 2 (x) Are not present 1. If there is a logic colnames they may be in a different order, but they all should be present. Alternatively, you can supply unknown lists and they will be included in the situation or use. Set names = FALSE. However, if we only use two arguments then everything is fine:  
  & gt; RBIDID (Data WABB), DT) x 1: 1 2: 2 3: 3   

Should the expected behavior be avier?

It seems that due to incompatible behavior in data.table :: rbind, data. Table . Adding the following line will fix it Please enter a bug-report with data.table developers .... original.names = lapply (list (. ..), name) allargs = lapply (list (...), as.data.table) original.names = root. Name [sapply (allargs, length)> 0L] # This new line is allargs = allargs [sapply (allargs, length)> 0L] ...

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -