I am having difficulty finding a package or finding code for a permutation test to correlate two non-square matrices. Basically, trying to do a mantel test but for non-square matrices. Any help is greatly appreciated.
Edit for more explanation: These matrices represent distance measures between males and females. One distance matrix is genetic data, the other distance matrix is chemical data. I have 19 females and 41 males (19x41 matrix). I don't want to compare males against each other, and females against each other in this test. So, ultimately, I have two distance matrices that I am trying to get a correlation coefficient and p-value estimated from, for example, 100 000 permutations.
Solved: I deconstructed the matrices using the melt command in the package RESHAPE. Then used perm.cor.test in the package JMUOUTLIER, and chose 10 000 permutations.