permutations | 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)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.