[datatable-help] Bug when Merging with nomatch=0 ?=and =?utf-8?Q?roll=T?

Arunkumar Srinivasan aragorn168b at gmail.com
Fri Jun 20 11:17:13 CEST 2014


For a given data.table, is there any condition …  Ergo, it's a bug, right? 
Yes.

I'll be glad 
to try to boil this down to something that's reproducible. 
That'd be great.


Arun

From: Michael Smith my.r.help at gmail.com
Reply: Michael Smith my.r.help at gmail.com
Date: June 20, 2014 at 5:37:24 AM
To: datatable-help at lists.r-forge.r-project.org datatable-help at lists.r-forge.r-project.org
Subject:  Re: [datatable-help] Bug when Merging with nomatch=0 and roll=T?  

So let me rephrase my question (haven't received an answer so far):  

For a given data.table, is there any condition under which the lengths  
of the vectors in each column may differ? Based on my understanding,  
each data.table is also a data.frame, and with a data frame this should  
not be possible. For example, it's not possible to have a data.frame  
where the first column is a vector of length eight, and the second  
column is a vector of length nine. Ergo, it's a bug, right?  

If my understanding is correct, please do let me know and I'll be glad  
to try to boil this down to something that's reproducible.  

Thanks,  
M  

On 06/19/2014 11:59 AM, Michael Smith wrote:  
> By the way, I know it's not reproducible with the code below. Before  
> going into further detail, I first wanted to ask whether this looks like  
> a bug, or whether I've overlooked something obvious and this is expected  
> behavior.  
>  
> Thanks,  
> M  
>  
> On 06/19/2014 11:51 AM, Michael Smith wrote:  
>> I got the following result on my keyed data tables `CS` and `SP`, which  
>> seems like a bug (in 1.9.2 and 1.9.3 dev version) to me, since all  
>> columns should have the _same_ length:  
>>  
>>> ## Works as expected:  
>>> all((l <- sapply(CS[SP, roll = TRUE], length)) == l[1])  
>> [1] TRUE  
>>> ## Works as expected:  
>>> all((l <- sapply(CS[SP, nomatch = 0], length)) == l[1])  
>> [1] TRUE  
>>> ## Here's the potential _bug_, when combining both:  
>>> all((l <- sapply(CS[SP, nomatch = 0, roll = TRUE], length)) == l[1])  
>> [1] FALSE  
>>  
>>  
>> Thanks,  
>>  
>> M  
>>  
_______________________________________________  
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/20140620/59736bb8/attachment.html>


More information about the datatable-help mailing list