A list equivalent might be useful in some cases. It should work like
list.expand(x = list(1,2,c(2,3)), y = list("x", c("p", "q")))
which produces a list with the following structure
List of 6
$ :List of 2
..$ x: num 1
..$ y: chr "x"
$ :List of 2
..$ x: num 1
..$ y: chr [1:2] "p" "q"
$ :List of 2
..$ x: num 2
..$ y: chr "x"
$ :List of 2
..$ x: num 2
..$ y: chr [1:2] "p" "q"
$ :List of 2
..$ x: num [1:2] 2 3
..$ y: chr "x"
$ :List of 2
..$ x: num [1:2] 2 3
..$ y: chr [1:2] "p" "q"
expand.grid
exhausts all possible combinations of elements from given vectors and form adata.frame
.A list equivalent might be useful in some cases. It should work like
which produces a list with the following structure