permutations {waddR} | R Documentation |
Returns permutations of a given NumericVector as columns in a NumericMatrix object.
permutations(x, num_permutations)
x |
NumericVector representing a vector that is to be permutated |
num_permutations |
Integer representing the number of permutations that are to be performed. |
a matrix containing in every column one permutations of the input vector
x <- seq(1:10) m <- permutations(x, 5) dim(m) #[1] 10 5