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.
## create a random permutation vectorpv <- sample(1:5)
pv
## convert into a permutation matrixpm <- permutation_vector2matrix(pv)
pm
## convert back permutation_matrix2vector(pm)