0

I'm very new to R and trying to add an ordispider to an ordplot (NMDS). My original data matrix has a site column, several weather columns, and columns with duck counts. I defined the whole matrix as NMDS. I defined the duck counts as:

duck_species <- NMDS[10:32]

I defined the weather data as:

Management<-NMDS[2:8]

I made the ordplot using metaMDS like this:

duck_species.mds <- metaMDS(comm = duck_species, distance = "bray", trace = FALSE, autotransform = TRUE)

Now I'm stuck on running the ordispider function. Do I need to run more functions on "Management" before I can put it into the ordispider function? I tried running it like this:

ordispider(duck_species.mds, Management, label = TRUE)
Error in table(groups) : attempt to make a table with >= 2^31 elements

I'm not sure if I need to use envfit somehow or what. Any help would be much appreciated.

Maurits Evers
  • 49,617
  • 4
  • 47
  • 68
  • 1
    Please see [here](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) on how to provide a minimal reproducible example (with a minimal dataset). – Maurits Evers Oct 17 '17 at 23:51
  • Indeed, a reproducible example, please. However, there are some obvious issues here already, although I can't reproduce them. (1) If your examples really work like you write, you're not using data frames, but something else (`tibble`?). (2) You cannot use `tibble` in the `ordispider` function call because of deliberate design decision (well worth of ASBO) in `tibble`, but you have to use their special "verbs" to get a working `group`. (3) Finally, in any system you must use one and only one variable as a group, and range (`NMDS[2:8]`) will always fail, even if you use proper data frames. – Jari Oksanen Oct 18 '17 at 17:18
  • Thank you for the replies! Mr. Oksanen, I ended up finding your manual here: http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf. I decided to ditch the ordispider idea and go with plotting the envfit. I followed the manual step by step and it worked out nicely. Envfit is actually more helpful for me than the ordispider would have been anyway. Sorry for the poor examples, I've never posted code before. – Chad Shoultz Oct 19 '17 at 00:43

0 Answers0