[datatable-help] merge zero row data.table

Arunkumar Srinivasan aragorn168b at gmail.com
Fri May 9 01:00:18 CEST 2014


Garrett,

Seems like it works fine in 1.9.2. I'd say it's a bug introduced due to changes in 1.9.3. Could you please file it as one? Thanks.

Arun

From: G See gsee000 at gmail.com
Reply: G See gsee000 at gmail.com
Date: May 9, 2014 at 12:57:15 AM
To: datatable-help at lists.r-forge.r-project.org datatable-help at lists.r-forge.r-project.org
Subject:  [datatable-help] merge zero row data.table  

Hi,  

Is the following error expected?  

> library(data.table)  
data.table 1.9.3 For help type: help("data.table")  
> a <- data.table(BOD, key="Time")  
> b <- data.table(BOD, key="Time")[Time < 0] # zero row data.table  
> merge(a,b, all=TRUE) # works fine  
Time demand.x demand.y  
1: 1 8.3 NA  
2: 2 10.3 NA  
3: 3 19.0 NA  
4: 4 16.0 NA  
5: 5 15.6 NA  
6: 7 19.8 NA  
> merge(b,a, all=TRUE) # error  
Error in setcolorder(dt, c(setdiff(names(dt), end), end)) :  
neworder is length 2 but x has 3 columns.  

Thanks,  
Garrett  

p.s. using svn Rev. 1263  
_______________________________________________  
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/20140509/54a03573/attachment.html>


More information about the datatable-help mailing list