perm {Deducer} | R Documentation |
Enumerates all permutations of a vector
perm(vec,duplicates=FALSE)
vec |
The vector to permute |
duplicates |
Should duplicate permutations be listed |
Returns a matrix where each row is a permutation of vec. All possible permutations are listed, and if duplicates=TRUE
non-unique permutations are also listed.
perm(1:4)
perm(LETTERS[4:8])