powered by
inverse.permutation(perm)
inverse.permutation(c(1,2,3,4)) inverse.permutation(c(2,3,4,1)) sample <- matrix(c(1,2,3, 4,1,4,3,2,1,2,4,3), nrow = 3, ncol = 4, byrow = TRUE) inverse.permutation(sample)
Run the code above in your browser using DataLab