perm: Vector Permutations

Description Usage Arguments Value See Also Examples

Description

Enumerates all permutations of a vector

Usage

1
perm(vec,duplicates=FALSE)

Arguments

vec

The vector to permute

duplicates

Should duplicate permutations be listed

Value

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.

See Also

sample

Examples

1
2
perm(1:4)
perm(LETTERS[4:8])


Search within the Deducer package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.