gavinsimpson / ggvegan

ggplot-based plots for vegan
https://gavinsimpson.github.io/ggvegan/
GNU General Public License v2.0
113 stars 30 forks source link

fortify.metaMDS failed if there were no species scores #6

Closed jarioksa closed 7 years ago

jarioksa commented 8 years ago

This would fail because autoplot/fortify try to find species scores:

> library(ggvegan)
> data(dune)
> autoplot(metaMDS(vegdist(dune), trace = FALSE))
Error in data.frame(out, Score = factor(rep(c("sites", "species"), c(nrow(samp),  : 
  arguments imply differing number of rows: 21, 40, 20