m <- matrix(rnorm(10), 5, 2)
m
permute(m, ser_permutation(5:1, 2:1))
d <- dist(m)
d
permute(d, ser_permutation(c(3,2,1,4,5)))
## this also works for 1-mode data:
# permute(d, ser_permutation_vector(c(3,2,1,4,5)))
# permute(d, c(3,2,1,4,5))
Run the code above in your browser using DataLab