Description Usage Arguments Value Examples
An implementation of the Steinhaus-Johnson-Trotter permutation algorithm.
1 | permutations(set)
|
set |
a set |
a matrix whose rows are the permutations of set
1 2 3 4 | permutations(1:3)
permutations(c('first','second','third'))
permutations(c(1,1,3))
apply(permutations(letters[1:6]), 1, paste, collapse = '')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.