Description Usage Arguments Details Examples
Generates all length(x)! permutations of the elements in a vector x. If there are duplicate elements in x then there will be repeated 'permuations' in the result.
1 | permutations(x)
|
x |
The vector to create permutations of |
The result is a list where each element is a vector containing one of the permutations.
1 2 3 | permutations(1:3)
permutations(c("a", "b", "c"))
permutations(c("raptors", "are", "horrible"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.