[datatable-help] indexing with nomatch=0

Arunkumar Srinivasan aragorn168b at gmail.com
Sat May 4 02:20:07 CEST 2013


"Indexing is merging with row numbers, so indeed there's a merging going on" - I hadn't seen it this way until now. But I like this. I see why you expect `nomatch=0` to work on indexing as well. And it makes sense to me.   

But I am not so much inclined towards the implementation of `merge`-like operations in X[Y] syntax. I'd love to be convinced. I just can't get my mind around the usage X[Y, all.X = TRUE] and even more X[Y, list(2 columns of X, 1 column of Y), all.X=TRUE]. I could just do Y[X, …] which makes more sense here. I am unable to wrap my head around the need for this feature...  

Arun


On Saturday, May 4, 2013 at 1:54 AM, Gabor Grothendieck wrote:

> data.table is supposed to generalize indexing and although not
> explicitly stated the generalization seems to be that indexing is
> merging with the row numbers so there is indeed merging going on and
> that merging should respect nomatch= for consistency.
>  
> On Fri, May 3, 2013 at 6:54 PM, Eduard Antonyan
> <eduard.antonyan at gmail.com (mailto:eduard.antonyan at gmail.com)> wrote:
> > There is no join'ing happening here, thus nomatch=0 has no effect.
> >  
> >  
> > On Fri, May 3, 2013 at 5:52 PM, Gabor Grothendieck <ggrothendieck at gmail.com (mailto:ggrothendieck at gmail.com)>
> > wrote:
> > >  
> > > The definition of DT was left out by mistake. It should be:
> > >  
> > > DT <- data.table(a=letters[1:3])
> > >  
> > >  
> > > On Fri, May 3, 2013 at 6:50 PM, Gabor Grothendieck
> > > <ggrothendieck at gmail.com (mailto:ggrothendieck at gmail.com)> wrote:
> > > > Consider this example:
> > > >  
> > > > > DT[1:4,,nomatch=0]
> > > > a
> > > > 1: a
> > > > 2: b
> > > > 3: c
> > > > 4: NA
> > > >  
> > > > Should it not return only the first 3 rows? It seems to be ignoring
> > > > the nomatch=0.
> > > >  
> > > > --
> > > > Statistics & Software Consulting
> > > > GKX Group, GKX Associates Inc.
> > > > tel: 1-877-GKX-GROUP
> > > > email: ggrothendieck at gmail.com (http://gmail.com)
> > > >  
> > >  
> > >  
> > >  
> > >  
> > > --
> > > Statistics & Software Consulting
> > > GKX Group, GKX Associates Inc.
> > > tel: 1-877-GKX-GROUP
> > > email: ggrothendieck at gmail.com (http://gmail.com)
> > > _______________________________________________
> > > datatable-help mailing list
> > > datatable-help at lists.r-forge.r-project.org (mailto:datatable-help at lists.r-forge.r-project.org)
> > >  
> > > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
>  
>  
>  
> --  
> Statistics & Software Consulting
> GKX Group, GKX Associates Inc.
> tel: 1-877-GKX-GROUP
> email: ggrothendieck at gmail.com (http://gmail.com)
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org (mailto: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/20130504/f7e46618/attachment.html>


More information about the datatable-help mailing list