Create k random permutations of a vector

Share:

Description

Creates a k random permutation of a vector.

Usage

1
Permutate(x, k)

Arguments

x

a vector to be permutated.

k

number of permutations to be conducted.

Details

should be used only for length(input)! >> k

Author(s)

Daniel Marcelino, dmarcelino@live.com.

Examples

1
2
3
#  5! = 5 x 4 x 3 x 2 x 1 = 120
# row wise permutations
Permutate(x=1:5, k=5)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.