Description Usage Arguments Value Author(s) See Also Examples
Generate the n:th lexicographic permutation of a vector. The 0:th permutation is the non-permuted vector. The last permutation is the (n-1):th. If the vector is of length N, there are N! permutation.
1 2 | ## Default S3 method:
lexicographicPermutation(x, n, ...)
|
x |
The |
n |
An |
... |
Not used. |
Returns a permuted vector
of the same length as the input vector.
Henrik Bengtsson
See lexicographicPermutations
() to generate all
lexicographic permutations of a vector.
See permutations
() for a wrapper function to generate
different types of permutations.
See x[sample(n)]
to generate a random permutation.
1 | ## Not run: See help(lexicographicPermutations) for an example.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.