r - vegan package NMDS categorical environmental variables

Viewed 349

I was following this example of plotting NMDS ordination. I was able to follow along and successfully make an NMDS plot with my data. I was even able to add significant species and continuous environmental vectors onto my plots but envifit did not work with categorical data and in the example it says you can use factorfit, which I tried but kept getting the error 'Error in rep(w, NR) : invalid 'times' argument'

This is the line of code that I was using:

emer.factorfit <- factorfit(emer.abun.mds, emer_veg, permutations = 999)

This is very similar to the envifit code used in the example. But I cannot find a good example of someone using factorfit. Is my code missing something? Do I have to define the categories? Any advice is appreciates.

0 Answers
Related