0

Im a begginer using R, and Im trying to apply a permutation process (statistical test) for two matrix comparison in order to assess if there is a real relation between spatial association and functional traits of forest tree species.

My first matrix is formed by indices of spatial interactions positive (+) and negative (-) between species. Positive interactions (+) were assigned with the value of 3 and negative interactions (-) with the value of 1. The second matrix, include the mean euclidean distance of functional traits between species.

Theoretically, what I want to do, is to randomize or permute the trait matrix (incidence matrix) along the spatial matrix, without broken (or better said-retaining) the spatial structure of association among species. One permutation for positive ones (+) and other permutation for negative ones (-).

Can anybody help me to structure a script in R to test this previous relationship? I just have the two csv species x species matrix files!.

  • Welcome to SO, Mike Harvey Salazar Villegas! Questions on SO (and especially in the [tag:r] tag) really benefit from being *reproducible*, including sample data (`dput(.)`) and code used/attempted. Please read from https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info for good discussions on how to do that, then come back and [edit] your question to add the requested information. (Also, SO is mostly about "real" problems with real code/data; if it is instead more hypothetical, other Stack sites may be better for you.) Thanks! – r2evans Sep 08 '21 at 15:59
  • Please provide enough code so others can better understand or reproduce the problem. – Community Sep 08 '21 at 15:59

0 Answers0