vegandevs / vegan

R package for community ecologists: popular ordination methods, ecological null models & diversity analysis
https://vegandevs.github.io/vegan/
GNU General Public License v2.0
448 stars 97 forks source link

envfit question #611

Closed jspychalla closed 9 months ago

jspychalla commented 9 months ago

Hi there,

I have biological data that was collected on a weekly basis and abiotic data that was collected on a daily basis. Can I use the envfit() function to map the abiotic data onto a PCoA of my biological data as it is? Or do I first need to calculate a weekly summary?

For instance I have samples A, B, and C collected on Week 1 and samples D, E, and F on Week 2 and data from weather station for which Days 1-7 are associated with Samples A-C and Days 8-14 are associated with samples D-F.

Thanks a bunch!

gavinsimpson commented 9 months ago

Yes, but you will likely need to sue a restricted permutation test if you want to use the p values in the output, because of the repeated measures over time. If you just want to use the projected vectors, that only requires math and there is no issue that I can see with doing what you want.