permutations | R Documentation |
Copied from Museful's solution from here
https://stackoverflow.com/questions/11095992/generating-all-distinct-permutations-of-a-list-in-r
This also mimics RcppAlgos::permuteGeneral(n,n)
permutations(n)
n |
an integer |
a matrix of n columns and factorial(n)
rows
permutations(3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.