permutations | R Documentation |
Given the input vector, generate a matrix of permutations where each row represents a permutation of the data. Stolen from: https://stackoverflow.com/a/34287541
permutations(x)
x |
vector |
factorial(x) x length(x) matrix
v <- letters[1:4]
p <- permutations(v)
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.