The problem is:
Survey results can be -1 0 or +1
What if there are 10 surveys?
There are 3^10 unique combinations.
But how do I list all possible -1 0 or +1 combinations for n surveys in R?
For example we could get:
-1 0 1 +1 1 0 1 -1 0 1
or
0 0 -1 -1 1 1 -1 0 1 -1
This will give a random sample of 1 possible combinations:
sample(c(-1,0,1),10,replace=T)
But how do I list all possible unique combinations given n surveys?
Thanks