Description Usage Arguments Value Examples
Returns permutations of a given vector as columns in a matrix
1 | 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
1 2 3 | x <- 1:10
set.seed(24)
permutations(x, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.