Hy4m / linkET

Everything is Linkable
135 stars 38 forks source link

issue in using different distance matrix for mantel test () #22

Closed rishidash12 closed 7 months ago

rishidash12 commented 8 months ago

I want give bray curtis distance in spec_dist and euclidean distance in env_dist but unfortunately I unable to give and it automatically taking euclidean distance for both the data. How to set different distance matrix for both the data in matel_test() function.

Hy4m commented 7 months ago

In summary, this is because the spec does not meet the basic condition for using the Bray distance method (the sum of any row is not equal to zero).

rishidash12 commented 7 months ago

Can you give some example how i can use bray-curtis distance?

Hy4m commented 7 months ago

Maybe set spec_dist argument to dist_func(.FUN = "vegdist", method = "bray")

rishidash12 commented 7 months ago

after setting the argument to dist_func(.FUN = "vegdist", method = "bray"), I got error like this mantel_test() using 'euclidean' dist method for 'env'. Error in purrr::pmap(): ℹ In index: 61. Caused by error in cor(): ! missing observations in cov/cor Run rlang::last_trace() to see where the error occurred. There were 14 warnings (use warnings() to see them)

please help me how to solve this error.