You’re looking for expand.grid
.
expand.grid(0:1, 0:1, 0:1)
Or, for the long case:
n <- 14
l <- rep(list(0:1), n)
expand.grid(l)
You’re looking for expand.grid
.
expand.grid(0:1, 0:1, 0:1)
Or, for the long case:
n <- 14
l <- rep(list(0:1), n)
expand.grid(l)