I'd like to create a data.frame of all possible permutations of 10 variables that can be either 1 or 2
2*2*2*2*2*2*2*2*2*2 = 1024 # possible
1,1,1,1,1,1,1,1,1,1
1,2,1,1,1,1,1,1,1,1
1,2,2,1,1,1,1,1,1,1
1,2,2,2,1,1,1,1,1,1
...
Is there a "quick" way to do this in R?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…