permutation | R Documentation |
Gets a permutation of the integers 1-N by its index 1-N!.
permutation(x, n)
x |
number (length 1 vector). The index of the permutation to generate. Must be less than |
n |
number (length 1 vector). The number of items in the permutation. |
Number vector of the integers 1-n re-ordered.
for (i in 1:24) print(permutation(i, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.