Carlos Soares
2008-Apr-24 13:36 UTC
[R] permutation of the rows of a matrix that minimizes the distance to another matrix
Hi! I have 2 matrices of numbers m1 and m2 with the same number of columns and rows. I would like to compute m2', the permutation of the rows of m2 such that the distance (e.g., sum(m1-m2') or sum((m1-m2')^2)) is minimized. Do you know of any function/algorithm to obtain such a permutation? Best regards, Carlos
Maybe Matching Threads
- Lmer, heteroscedasticity and permutation, need help please
- Permutations in RDA for repeated measures, using how()
- column permutation of sparse matrix
- partial mantel tests in ecodist with intential NA values.
- significance testing for the difference in the ratio of means