powered by
This function creates all permutations of a given vector.
vector
permutations(x)
A list of all permutations of x.
list
x
Any vector.
Modified version of https://stackoverflow.com/a/20199902/15157768.
permutations(1:3) permutations(LETTERS[1:3])
Run the code above in your browser using DataLab