尝试向NMDS添加置信椭圆会出现错误“ cov.wt(X,W)中的错误:'x'必须仅包含有限值”

时间:2018-06-20 16:47:16

标签: r plot confidence-interval vegan phyloseq

我正在尝试使用素食主义者软件包和函数“ ordiellipse”将95%置信椭圆添加到NMDS图中,并不断收到相同的错误消息。排序看起来像这样:

microcosm_nmds <- ordinate(physeq = physeq_bac1, method = "NMDS", distance = "bray")

plot_ordination(
  physeq = physeq_bac1,
  ordination = microcosm_nmds,
  color = "day",
  shape = "location",
  title = "NMDS of Microcosm bacterial Communities"
) + 
  scale_color_manual(values = c("red", "#ffae19",
                              "#4daf4a", "#1919ff", "darkorchid3", "magenta")
  ) +
  geom_point(aes(color = day), alpha = 0.7, size = 4) +
  geom_point(colour = "grey90", size = 1.5)

我要使用的椭圆代码是:

ordiellipse(microcosm_nmds, groups = "day", display = "sites", kind = "sd", conf = 0.95, col = "black", w = NULL)

执行此操作时,我不断收到错误消息,提示“ cov.wt(X,W)中的错误:'x'必须仅包含有限值”,但我不确定为什么。数据中没有NA或缺少值,并且排序工作正常。我只能猜测它与样本权重有关吗?但是我不确定。任何帮助将不胜感激。

谢谢!

0 个答案:

没有答案