Generalize expand.grid() for multi-columns data. Build all combinations of lines from X1 and X2. Each line may hold multiple columns.
combn.design(X1, X2)
variable values, possibly with many columns
variable values, possibly with many columns combn.design(matrix(c(10,20),ncol=1),matrix(c(1,2,3,4,5,6),ncol=2)) combn.design(matrix(c(10,20,30,40),ncol=2),matrix(c(1,2,3,4,5,6),ncol=2))