Permutate: Create k random permutations of a vector

Description Usage Arguments Details Author(s) Examples

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)

danielmarcelino/SciencesPo documentation built on Oct. 20, 2019, 1:15 a.m.