[datatable-help] CJ() no longer preserves column names

Muhammad Waliji mhwaliji at google.com
Tue Apr 10 19:12:22 CEST 2012


Thanks Matthew!

On Tue, Apr 10, 2012 at 10:11 AM, Matthew Dowle <mdowle at mdowle.plus.com>wrote:

> Thanks. Now fixed in 1.8.1.
>
> o CJ(x=...,y=...) now retains the column names x and y, useful when CJ
>  is used independently (since x[CJ(...)] takes join column names from
>  x). Restores behaviour lost somewhere between 1.7.1 and 1.8.0, thanks
>  to Muhammad Waliji for reporting. Tests added.
>
>
> On Wed, 2012-04-04 at 11:44 -0700, Muhammad Waliji wrote:
> > With data.table 1.8.0:
> > > CJ(x=c(1,2), y=c("a","b"))
> >      V1 V2
> > [1,]  1  a
> > [2,]  1  b
> > [3,]  2  a
> > [4,]  2  b
> >
> >
> > With data.table 1.7.1:
> > > CJ(x=c(1,2), y=c("a","b"))
> >      x y
> > [1,] 1 a
> > [2,] 1 b
> > [3,] 2 a
> > [4,] 2 b
> >
> >
> > I looked through the NEWS file and this doesn't seem to be announced.
> > Can this be fixed? I have code that relies on the column names being
> > present.
> >
> >
> > Thanks!
> > -Muhammad
> >
> >
> > _______________________________________________
> > 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/20120410/e529ccda/attachment.html>


More information about the datatable-help mailing list