I have two numbers a=1.2 & b=0.9 and want to find out all possible combinations to arrange a&b in a vector with length 10. There has to be 5 elements of a and 5 elements of b in that vector. How can I write this in R? Many thanks!
ideal output would be a matrix to all combinations:
1. (a,b,a,b,a,b,a,b,a,b)
2. (a,a,a,a,a,b,b,b,b,b)
.
.
.