ANOSIM in Vegan is not working

泄露秘密 提交于 2019-12-04 05:03:37

问题


I am trying to perform an anosim analysis in Vegan, but it doesn't seem to work... It doesn't give an error after the anosim function, but when I try to see the summary it says:

Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
'x' must be atomic

My data looks like a simple community matrix with sites and species (identical to the Dune data set).

I've tried this:

dist.com <- vegdist(data, method = "bray")
an = anosim(dist.com, env)
summary(an)

The class of data is a data.frame , the class of env is factor and the class of dist.com is dist.

It is identical to the example in help...

How can I fix this problem?


回答1:


There is nothing reproducible here, but I can generate this error message if the factor has only one level:

summary(anosim(vegdist(dune), rep("a", nrow(dune))))



来源:https://stackoverflow.com/questions/28701743/anosim-in-vegan-is-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!