How to generate a matrix of combinations

expand.grid(c(-1,1), c(-1,1), c(-1,1), c(-1,1), c(-1,1))

Leave a Comment