All possible ways of ordering n values

combinations, interaction, r

Solution

Try using `permn` from combinat package

library(combinat)
permn(myVect)

It'll take a while since the number of all possible combinations is 3628800

Problem

Here is a vector: ``` myVect = c(1,6,3,12,11,15,7,9,19,21) ``` How can get a list of all possible different vectors we can get by reordering `myVect`? one possible way of reordering can be obtained with: ``` set.seed(12) sample(myVect) ```

Original source