# permutation_matrix

From seriation v1.2-2
by Michael Hahsler

##### Conversion Between Permutation Vector and Permutation Matrix

Converts between permutation vectors and matrices.

- Keywords
- manip

##### Usage

```
permutation_matrix2vector(x)
permutation_vector2matrix(x)
```

##### Arguments

- x
- A permutation vector (any object that can be converted into a
permutation vector, e.g., a integer vector or a
`hclust`

object) or a matrix representing a permutation. Arguments are checked.

##### See Also

##### Examples

```
## create a random permutation vector
pv <- sample(1:5)
pv
## convert into a permutation matrix
pm <- permutation_vector2matrix(pv)
pm
## convert back
permutation_matrix2vector(pm)
```

*Documentation reproduced from package seriation, version 1.2-2, License: GPL-3*

### Community examples

Looks like there are no examples yet.