Permn: Determine All Possible Permutations of a Set
Description
Return the set of permutations for a given set of values.
The values can be numeric values, characters or factors.
Usage
Permn(x, sort = FALSE)
Arguments
x
a vector of numeric values or characters. Characters need not be unique.
sort
logical, defining if the result set should be sorted. Default is FALSE.
Value
a data.frame with all possible permutations of the values in x.
Details
The vector x need not contain unique values. The permutations will
automatically be filtered for unique sets, if the same element is given twice or more.