permutations {oeli} | R Documentation |
This function creates all permutations of a given vector
.
permutations(x)
x |
Any |
A list
of all permutations of x
.
Modified version of https://stackoverflow.com/a/20199902/15157768.
permutations(1:3)
permutations(LETTERS[1:3])