I am trying to create the unique permutations of the vector
c(rep(0,20),rep(1,20))
but permn in the combinat package says "Error in vector.... vector size specified is too large".
I also tried the script uniqueperm2 from this question and got a "vector specified is too large" error again.
In my understanding permn would be creating 40! permutations.
I might be able to solve the overall problem I am working on just by finding the number of unique permutations of this vector.
Is the problem of finding the unique permutations of a length 40 vector too big for R and can anyone explain to me how to figure out the number of unique permutations of the listed vector?