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

Muhammad Waliji mhwaliji at google.com
Wed Apr 4 20:44:05 CEST 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20120404/36b598e8/attachment.html>


More information about the datatable-help mailing list