In data.table 1.7.4: > CJ(c(3,1,2), 0:1) V1 V2 [1,] 3 0 [2,] 3 1 [3,] 1 0 [4,] 1 1 [5,] 2 0 [6,] 2 1 > CJ(0:1, c(3,1,2)) Error in setkey(l) : logical error nrow(dt)!=length(order) I'm confused. --Steve