permutations {waddR} | R Documentation |
Returns permutations of a given vector as columns in a matrix
permutations(x, num_permutations)
x |
vector that is to be permutated |
num_permutations |
number of permutations to be performed |
a matrix, where each of the num_permutations
columns represents one permutation of the input vector
x <- 1:10 set.seed(24) permutations(x, 5)