R vegan 包错误说数据不能包含 NA,但数据框不包含 NA

R vegan package error says data can't contain NA, but the dataframe doesn't contain NAs

我正在尝试 运行 一些数据的 NMDS,使用 R vegan 包中的 metaMDS 函数。我已经设法 运行 使用类似的数据框,但出于某种原因,我收到以下错误:

>Error in cmdscale(dist, k = k) : NA values not allowed in 'd'
In addition: Warning messages:
1: In distfun(comm, method = distance, ...) :
  you have empty rows: their dissimilarities may be meaningless in method “bray”
2: In distfun(comm, method = distance, ...) : missing values in results

由于它是一个大型数据框,我已将其放入 Google sheet here 对于上下文,行是样本,列是基因,值表示样本中基因的水平。

对于 NMDS,我想看看这些样本有多相似,据我所知,我已经正确设置了数据。

所以我尝试了 运行以下方法;

library(vegan)
NMDS <- metaMDS(NMDS, distance="bray") 

其中 NMDS 是数据帧。这是我收到上述错误的地方,我不确定我做错了什么?

这也发生在我 运行 以下代码之后:

NMDS[is.na(NMDS)] = 0

有什么地方出错了吗?

输入:

structure(list(X1 = c(0, 0, 0, 0, 0, 0), X2 = c(0, 0, 0, 0, 0, 
0), X3 = c(0, 0, 0, 0, 0, 0), X4 = c(0, 0, 0, 0, 0, 0), X5 = c(0, 
0, 0, 0, 0, 0), X6 = c(0, 28, 161, 688, 0, 0), X7 = c(0, 3, 14, 
0, 0, 0), X8 = c(0, 0, 0, 0, 0, 0), X9 = c(3, 0, 2, 2, 0, 0), 
    X10 = c(12, 78, 602, 303, 900, 0), X11 = c(0, 52, 856, 28, 
    191, 0), X12 = c(0, 51, 12, 1, 0, 0), X13 = c(0, 0, 0, 0, 
    0, 0), X14 = c(0, 0, 2, 0, 0, 0), X15 = c(5, 17, 46, 39, 
    9, 0), X16 = c(5255, 1531, 6790, 3302, 5084, 0), X17 = c(0, 
    0, 0, 0, 0, 0), X18 = c(0, 0, 15, 0, 0, 0), X19 = c(0, 0, 
    0, 0, 0, 0), X20 = c(0, 0, 0, 0, 0, 0), X21 = c(0, 0, 0, 
    0, 0, 0), X22 = c(0, 0, 0, 0, 0, 0), X23 = c(0, 0, 0, 0, 
    0, 0), X24 = c(0, 0, 44, 0, 0, 0), X25 = c(0, 0, 0, 0, 0, 
    0), X26 = c(0, 6, 24, 185, 0, 0), X27 = c(0, 0, 0, 0, 0, 
    0), X28 = c(0, 0, 13, 0, 0, 0), X29 = c(0, 0, 0, 0, 0, 0), 
    X30 = c(0, 0, 0, 7, 0, 0), X31 = c(0, 0, 0, 0, 0, 0), X32 = c(0, 
    0, 0, 0, 0, 0), X33 = c(0, 0, 1, 2, 0, 0), X34 = c(0, 0, 
    0, 0, 0, 0), X35 = c(0, 0, 0, 0, 0, 0), X36 = c(0, 2, 0, 
    0, 0, 0), X37 = c(0, 0, 0, 0, 0, 0), X38 = c(0, 0, 0, 0, 
    0, 0), X39 = c(0, 0, 0, 0, 0, 0), X40 = c(0, 0, 0, 0, 0, 
    0), X41 = c(0, 0, 0, 0, 0, 0), X42 = c(0, 0, 0, 0, 0, 0), 
    X43 = c(0, 0, 0, 0, 0, 0), X44 = c(0, 0, 0, 0, 0, 0), X45 = c(0, 
    0, 0, 1, 0, 0), X46 = c(0, 0, 0, 63, 0, 0), X47 = c(0, 0, 
    0, 0, 0, 0), X48 = c(0, 0, 0, 0, 0, 0), X49 = c(0, 0, 0, 
    0, 0, 0), X50 = c(0, 0, 0, 0, 0, 0), X51 = c(0, 0, 0, 0, 
    0, 0), X52 = c(0, 0, 0, 0, 0, 0), X53 = c(0, 0, 0, 1, 0, 
    0), X54 = c(0, 0, 0, 0, 0, 0), X55 = c(0, 0, 0, 1, 0, 0), 
    X56 = c(0, 0, 0, 0, 0, 0), X57 = c(0, 0, 3, 0, 0, 0), X58 = c(0, 
    0, 0, 0, 0, 0), X59 = c(0, 0, 0, 0, 0, 0), X60 = c(0, 0, 
    0, 0, 0, 0), X61 = c(0, 0, 44, 0, 0, 0), X62 = c(0, 0, 15, 
    0, 0, 0), X63 = c(0, 0, 347, 0, 0, 0), X64 = c(0, 0, 0, 0, 
    0, 0), X65 = c(0, 0, 0, 5, 0, 0), X66 = c(0, 0, 0, 0, 0, 
    0), X67 = c(1, 8, 2, 11, 6, 0), X68 = c(0, 26, 0, 0, 0, 0
    ), X69 = c(0, 0, 0, 8, 0, 0), X70 = c(0, 0, 0, 13, 0, 0), 
    X71 = c(0, 0, 0, 0, 0, 0), X72 = c(0, 2, 0, 0, 0, 0), X73 = c(0, 
    0, 0, 0, 0, 0), X74 = c(341, 74, 0, 0, 0, 0), X75 = c(4, 
    6, 10, 17, 13, 0), X76 = c(0, 0, 0, 0, 0, 0), X77 = c(0, 
    0, 0, 0, 0, 0), X78 = c(0, 0, 0, 6, 0, 0), X79 = c(0, 0, 
    0, 0, 0, 0), X80 = c(0, 0, 0, 0, 0, 0), X81 = c(403, 86, 
    0, 0, 0, 0), X82 = c(20, 95, 54, 0, 0, 0), X83 = c(0, 2, 
    0, 1, 0, 0), X84 = c(0, 0, 3, 1, 0, 0), X85 = c(0, 0, 0, 
    0, 0, 0), X86 = c(40, 132, 39, 0, 1, 0), X87 = c(0, 0, 0, 
    0, 0, 0), X88 = c(0, 0, 0, 0, 0, 0), X89 = c(0, 0, 0, 0, 
    0, 0), X90 = c(0, 0, 0, 0, 0, 0), X91 = c(0, 0, 0, 0, 0, 
    0), X92 = c(0, 7, 0, 0, 0, 0), X93 = c(0, 0, 0, 0, 0, 0), 
    X94 = c(0, 0, 0, 0, 0, 0), X95 = c(0, 0, 0, 0, 0, 0), X96 = c(0, 
    0, 0, 0, 0, 0), X97 = c(0, 0, 0, 0, 0, 0), X98 = c(0, 0, 
    0, 0, 0, 0), X99 = c(0, 0, 0, 0, 0, 0), X100 = c(0, 0, 0, 
    0, 0, 0), X101 = c(0, 0, 0, 0, 0, 0), X102 = c(0, 8, 0, 1, 
    0, 0), X103 = c(0, 0, 0, 0, 0, 0), X104 = c(0, 0, 0, 0, 0, 
    0), X105 = c(0, 0, 0, 0, 0, 0), X106 = c(0, 0, 0, 0, 0, 0
    ), X107 = c(0, 0, 0, 0, 0, 0), X108 = c(0, 0, 0, 0, 0, 0), 
    X109 = c(0, 0, 0, 0, 0, 0), X110 = c(0, 0, 0, 0, 0, 0), X111 = c(0, 
    0, 0, 0, 0, 0), X112 = c(15, 47, 0, 1, 0, 0), X113 = c(0, 
    0, 0, 0, 0, 0), X114 = c(0, 0, 0, 0, 0, 0), X115 = c(0, 0, 
    0, 2, 0, 0), X116 = c(43, 0, 0, 1, 1, 0), X117 = c(0, 0, 
    0, 0, 0, 0), X118 = c(0, 0, 0, 0, 0, 0), X119 = c(0, 0, 0, 
    0, 0, 0), X120 = c(387, 0, 0, 0, 0, 0), X121 = c(0, 0, 0, 
    0, 0, 0), X122 = c(342, 1, 0, 72, 0, 0), X123 = c(0, 0, 0, 
    0, 0, 0), X124 = c(0, 0, 0, 76, 0, 0), X125 = c(0, 0, 0, 
    0, 0, 0), X126 = c(0, 0, 0, 0, 0, 0), X127 = c(0, 2, 0, 0, 
    0, 0), X128 = c(0, 0, 0, 0, 0, 0), X129 = c(0, 0, 0, 0, 0, 
    0), X130 = c(0, 0, 0, 0, 0, 0), X131 = c(0, 0, 0, 0, 0, 0
    ), X132 = c(0, 0, 0, 0, 0, 0), X133 = c(0, 0, 0, 0, 0, 0), 
    X134 = c(0, 0, 0, 11, 0, 0), X135 = c(13, 108, 0, 129, 192, 
    0), X136 = c(0, 0, 0, 0, 0, 0), X137 = c(18, 129, 0, 23, 
    0, 0), X138 = c(0, 0, 0, 32, 7, 0), X139 = c(1, 0, 0, 10, 
    0, 0), X140 = c(0, 0, 0, 3, 0, 0), X141 = c(0, 0, 0, 0, 0, 
    0), X142 = c(0, 0, 0, 14, 0, 0), X143 = c(0, 0, 0, 0, 0, 
    0), X144 = c(16, 74, 71, 0, 0, 0), X145 = c(0, 0, 0, 0, 392, 
    0), X146 = c(0, 24, 224, 1, 0, 0), X147 = c(0, 19, 224, 1, 
    0, 0), X148 = c(0, 13, 253, 0, 0, 0), X149 = c(49, 17, 17, 
    0, 0, 0), X150 = c(133, 70, 74, 0, 0, 0), X151 = c(0, 0, 
    0, 0, 0, 0), X152 = c(0, 0, 0, 0, 0, 0), X153 = c(0, 0, 0, 
    0, 0, 0), X154 = c(0, 0, 0, 0, 0, 0), X155 = c(0, 0, 0, 0, 
    0, 0), X156 = c(0, 1, 0, 0, 0, 0), X157 = c(0, 0, 0, 0, 0, 
    0), X158 = c(0, 0, 0, 22, 0, 0), X159 = c(0, 0, 0, 0, 0, 
    0), X160 = c(0, 0, 0, 10, 0, 0), X161 = c(0, 0, 0, 106, 0, 
    0), X162 = c(148, 27, 85, 0, 0, 0), X163 = c(0, 0, 0, 0, 
    0, 0), X164 = c(0, 0, 0, 0, 0, 0), X165 = c(0, 10, 0, 0, 
    0, 0), X166 = c(0, 5, 0, 0, 0, 0), X167 = c(0, 0, 0, 0, 0, 
    0), X168 = c(1, 0, 0, 0, 0, 0), X169 = c(0, 7, 0, 0, 0, 0
    ), X170 = c(0, 0, 0, 2, 0, 0), X171 = c(0, 0, 0, 0, 0, 0), 
    X172 = c(0, 0, 0, 0, 0, 0), X173 = c(0, 0, 0, 0, 0, 0), X174 = c(0, 
    0, 0, 0, 0, 0), X175 = c(0, 0, 0, 2, 0, 0), X176 = c(0, 0, 
    0, 0, 0, 0), X177 = c(0, 0, 0, 212, 0, 0), X178 = c(0, 1, 
    0, 0, 0, 0), X179 = c(0, 0, 0, 0, 0, 0), X180 = c(0, 0, 0, 
    0, 0, 0), X181 = c(0, 0, 0, 0, 0, 0), X182 = c(0, 0, 0, 0, 
    0, 0), X183 = c(0, 0, 0, 0, 0, 0), X184 = c(0, 0, 0, 0, 0, 
    0), X185 = c(0, 9, 0, 0, 0, 0), X186 = c(0, 0, 0, 0, 0, 0
    ), X187 = c(0, 0, 0, 0, 0, 0), X188 = c(0, 0, 0, 0, 0, 0), 
    X189 = c(0, 0, 0, 0, 0, 0), X190 = c(475, 108, 329, 14, 57, 
    0), X191 = c(0, 0, 8, 0, 0, 0), X192 = c(0, 0, 0, 0, 0, 0
    ), X193 = c(0, 0, 0, 0, 0, 0), X194 = c(0, 0, 0, 0, 0, 0), 
    X195 = c(0, 0, 0, 0, 0, 0), X196 = c(0, 0, 0, 0, 0, 0), X197 = c(0, 
    0, 0, 0, 0, 0), X198 = c(0, 0, 2, 0, 0, 0), X199 = c(0, 0, 
    0, 0, 0, 0), X200 = c(0, 0, 0, 0, 0, 0), X201 = c(0, 27, 
    647, 1, 0, 0), X202 = c(0, 0, 0, 0, 0, 0), X203 = c(0, 0, 
    0, 0, 0, 0), X204 = c(0, 0, 0, 0, 0, 0), X205 = c(251, 41, 
    58, 0, 1, 0), X206 = c(0, 0, 0, 0, 0, 0), X207 = c(0, 0, 
    0, 0, 0, 0), X208 = c(0, 0, 0, 0, 0, 0), X209 = c(0, 0, 0, 
    0, 0, 0), X210 = c(0, 0, 0, 0, 0, 0), X211 = c(0, 0, 0, 0, 
    0, 0), X212 = c(0, 0, 0, 0, 0, 0), X213 = c(0, 0, 0, 0, 0, 
    0), X214 = c(0, 0, 0, 0, 0, 0), X215 = c(0, 0, 0, 0, 0, 0
    ), X216 = c(0, 0, 0, 0, 0, 0), X217 = c(0, 0, 0, 0, 0, 0), 
    X218 = c(0, 0, 0, 0, 0, 0), X219 = c(0, 0, 0, 0, 0, 0), X220 = c(0, 
    0, 0, 0, 0, 0), X221 = c(0, 0, 0, 0, 0, 0), X222 = c(0, 0, 
    0, 0, 0, 0), X223 = c(0, 0, 0, 0, 0, 0), X224 = c(2, 0, 0, 
    0, 0, 0), X225 = c(0, 0, 0, 0, 0, 0), X226 = c(0, 0, 0, 0, 
    0, 0), X227 = c(0, 0, 0, 0, 0, 0), X228 = c(0, 0, 0, 0, 0, 
    0), X229 = c(0, 0, 0, 0, 0, 0), X230 = c(0, 0, 0, 0, 0, 0
    ), X231 = c(1, 0, 0, 0, 0, 0), X232 = c(0, 0, 0, 0, 0, 0), 
    X233 = c(0, 0, 0, 0, 0, 0), X234 = c(0, 0, 0, 0, 0, 0), X235 = c(0, 
    0, 0, 0, 0, 0), X236 = c(0, 0, 0, 0, 0, 0), X237 = c(0, 0, 
    0, 0, 0, 0), X238 = c(0, 0, 0, 0, 0, 0), X239 = c(0, 0, 0, 
    0, 0, 0), X240 = c(1, 0, 0, 0, 0, 0), X241 = c(445, 90, 0, 
    0, 1, 0), X242 = c(1, 70, 0, 0, 0, 0), X243 = c(23, 154, 
    11, 0, 0, 0), X244 = c(0, 0, 1, 0, 0, 0), X245 = c(174, 250, 
    192, 6, 0, 0), X246 = c(0, 2, 0, 1, 0, 0), X247 = c(0, 0, 
    0, 0, 0, 0), X248 = c(0, 0, 0, 0, 0, 0), X249 = c(29, 73, 
    20, 0, 0, 0), X250 = c(0, 99, 0, 0, 0, 0), X251 = c(20, 66, 
    4, 0, 0, 0), X252 = c(265, 48, 191, 0, 1, 0), X253 = c(112, 
    59, 0, 0, 0, 0), X254 = c(0, 3, 3, 0, 0, 0), X255 = c(0, 
    1, 0, 0, 0, 0), X256 = c(0, 0, 0, 0, 0, 0), X257 = c(0, 2, 
    0, 0, 0, 0), X258 = c(0, 0, 0, 0, 0, 0), X259 = c(86, 44, 
    69, 0, 0, 0), X260 = c(0, 0, 0, 0, 0, 0), X261 = c(13, 27, 
    0, 0, 1, 0), X262 = c(0, 5, 0, 0, 0, 0), X263 = c(0, 0, 0, 
    0, 0, 0), X264 = c(0, 0, 0, 0, 0, 0), X265 = c(0, 0, 0, 0, 
    0, 0), X266 = c(0, 0, 0, 0, 0, 0), X267 = c(0, 1, 0, 0, 0, 
    0), X268 = c(0, 0, 0, 0, 0, 0), X269 = c(0, 0, 0, 0, 0, 0
    ), X270 = c(0, 0, 0, 0, 0, 0), X271 = c(0, 0, 0, 4, 0, 0), 
    X272 = c(0, 0, 0, 0, 0, 0), X273 = c(0, 0, 0, 0, 0, 0), X274 = c(0, 
    0, 0, 0, 0, 0), X275 = c(291, 200, 115, 0, 0, 0), X276 = c(0, 
    5, 0, 0, 0, 0), X277 = c(0, 0, 0, 0, 0, 0), X278 = c(0, 5, 
    0, 5, 0, 0), X279 = c(0, 3, 2, 6, 0, 0), X280 = c(0, 0, 28, 
    0, 0, 0), X281 = c(0, 1, 0, 0, 0, 0), X282 = c(0, 8, 1, 5, 
    0, 0), X283 = c(0, 3, 0, 1, 0, 0), X284 = c(0, 0, 17, 0, 
    0, 0), X285 = c(0, 3, 0, 0, 0, 0), X286 = c(0, 0, 0, 0, 0, 
    0), X287 = c(0, 1, 1, 4, 0, 0), X288 = c(0, 0, 0, 0, 0, 0
    ), X289 = c(0, 2, 0, 0, 0, 0), X290 = c(0, 0, 0, 0, 0, 0), 
    X291 = c(0, 0, 0, 0, 0, 0), X292 = c(0, 0, 0, 4, 0, 0), X293 = c(0, 
    0, 0, 0, 0, 0), X294 = c(38, 10, 72, 0, 0, 0), X295 = c(0, 
    58, 0, 0, 0, 0), X296 = c(0, 20, 0, 0, 0, 0), X297 = c(69, 
    4, 39, 0, 1, 0), X298 = c(0, 15, 304, 3, 0, 0), X299 = c(0, 
    0, 0, 0, 0, 0), X300 = c(0, 6, 0, 0, 0, 0), X301 = c(0, 1, 
    0, 0, 0, 0), X302 = c(51, 28, 13, 0, 0, 0), X303 = c(96, 
    149, 28, 0, 0, 0), X304 = c(34, 25, 24, 0, 0, 0), X305 = c(0, 
    3, 1, 0, 0, 0), X306 = c(0, 3, 7, 0, 0, 0), X307 = c(0, 4, 
    0, 0, 0, 0), X308 = c(0, 0, 0, 0, 0, 0), X309 = c(0, 0, 35, 
    1, 0, 0), X310 = c(262, 9, 137, 0, 0, 0), X311 = c(3, 15, 
    0, 2, 9, 0), X312 = c(445, 139, 353, 48, 16, 0), X313 = c(0, 
    0, 0, 0, 0, 0), X314 = c(0, 0, 0, 0, 0, 0), X315 = c(0, 0, 
    0, 0, 0, 0), X316 = c(0, 0, 0, 0, 0, 0), X317 = c(0, 0, 0, 
    0, 0, 0), X318 = c(0, 0, 0, 0, 0, 0), X319 = c(0, 0, 0, 0, 
    0, 0), X320 = c(62, 138, 36, 0, 0, 0), X321 = c(3, 0, 0, 
    0, 0, 0), X322 = c(0, 0, 0, 0, 0, 0), X323 = c(0, 13, 0, 
    0, 0, 0), X324 = c(0, 0, 0, 0, 0, 0), X325 = c(142, 0, 104, 
    0, 0, 0), X326 = c(0, 2, 0, 0, 0, 0), X327 = c(56, 35, 101, 
    0, 0, 0), X328 = c(0, 0, 0, 10, 0, 0), X329 = c(0, 0, 0, 
    0, 0, 0), X330 = c(0, 2, 0, 0, 0, 0), X331 = c(259, 27, 107, 
    0, 2, 0), X332 = c(0, 0, 0, 0, 0, 0), X333 = c(0, 7, 0, 0, 
    0, 0), X334 = c(0, 0, 0, 0, 0, 0), X335 = c(98, 39, 95, 0, 
    0, 0), X336 = c(0, 0, 1, 0, 0, 0), X337 = c(0, 0, 0, 0, 0, 
    0), X338 = c(141, 28, 85, 0, 0, 0), X339 = c(15, 14, 20, 
    0, 0, 0), X340 = c(0, 6, 0, 0, 0, 0), X341 = c(0, 0, 0, 0, 
    0, 0), X342 = c(0, 2, 0, 0, 0, 0), X343 = c(0, 0, 0, 0, 0, 
    0), X344 = c(0, 0, 0, 0, 0, 0), X345 = c(0, 10, 232, 0, 0, 
    0), X346 = c(0, 4, 0, 0, 0, 0), X347 = c(0, 0, 0, 0, 0, 0
    ), X348 = c(0, 0, 0, 0, 0, 0), X349 = c(0, 0, 0, 0, 0, 0), 
    X350 = c(0, 0, 0, 0, 0, 0), X351 = c(0, 0, 0, 0, 0, 0), X352 = c(0, 
    0, 0, 0, 0, 0), X353 = c(0, 0, 0, 0, 4, 0), X354 = c(0, 0, 
    0, 0, 0, 0), X355 = c(0, 0, 0, 0, 1, 0), X356 = c(0, 0, 0, 
    0, 0, 0), X357 = c(0, 0, 0, 0, 0, 0), X358 = c(0, 0, 0, 0, 
    0, 0), X359 = c(0, 0, 0, 0, 0, 0), X360 = c(0, 0, 0, 0, 0, 
    0), X361 = c(0, 0, 0, 0, 0, 0), X362 = c(0, 0, 0, 0, 0, 0
    ), X363 = c(0, 0, 0, 0, 0, 0), X364 = c(0, 0, 0, 0, 2, 0), 
    X365 = c(0, 0, 0, 0, 0, 0), X366 = c(0, 0, 0, 0, 0, 0), X367 = c(0, 
    0, 0, 0, 0, 0), X368 = c(0, 0, 0, 0, 0, 0), X369 = c(0, 0, 
    0, 17, 0, 0), X370 = c(0, 0, 0, 0, 0, 0), X371 = c(0, 0, 
    0, 0, 0, 0), X372 = c(0, 0, 0, 0, 0, 0), X373 = c(0, 0, 0, 
    0, 0, 0), X374 = c(0, 0, 0, 0, 0, 0), X375 = c(0, 0, 0, 0, 
    0, 0), X376 = c(0, 0, 1, 0, 0, 0), X377 = c(0, 0, 0, 0, 0, 
    0), X378 = c(0, 0, 0, 0, 0, 0), X379 = c(0, 0, 0, 0, 0, 0
    ), X380 = c(0, 0, 0, 0, 0, 0), X381 = c(0, 0, 0, 0, 0, 0), 
    X382 = c(0, 0, 0, 0, 0, 0), X383 = c(0, 51, 0, 0, 0, 0), 
    X384 = c(0, 0, 0, 0, 0, 0), X385 = c(7, 0, 0, 11, 1, 0), 
    X386 = c(0, 0, 0, 0, 0, 0), X387 = c(0, 0, 1, 0, 0, 0), X388 = c(0, 
    0, 0, 0, 0, 0), X389 = c(0, 0, 0, 0, 0, 0), X390 = c(0, 5, 
    0, 0, 0, 0), X391 = c(0, 0, 0, 0, 0, 0), X392 = c(0, 0, 0, 
    0, 0, 0), X393 = c(2, 16, 0, 0, 0, 0), X394 = c(0, 6, 88, 
    0, 0, 0), X395 = c(0, 14, 136, 1, 0, 0), X396 = c(0, 41, 
    350, 2, 0, 0), X397 = c(0, 0, 0, 0, 0, 0), X398 = c(20, 413, 
    0, 12, 3, 0), X399 = c(0, 0, 0, 0, 0, 0), X400 = c(0, 3, 
    0, 0, 0, 0), X401 = c(0, 0, 0, 0, 0, 0), X402 = c(0, 2, 0, 
    0, 0, 0), X403 = c(0, 2, 0, 0, 0, 0), X404 = c(0, 0, 0, 0, 
    0, 0), X405 = c(0, 0, 0, 0, 0, 0), X406 = c(0, 0, 0, 0, 0, 
    0), X407 = c(0, 0, 39, 1, 0, 0), X408 = c(10, 73, 31, 0, 
    0, 0), X409 = c(0, 11, 0, 0, 0, 0), X410 = c(68, 58, 66, 
    1, 0, 0), X411 = c(4, 32, 3, 0, 0, 0), X412 = c(8, 66, 39, 
    0, 0, 0), X413 = c(0, 0, 0, 0, 0, 0), X414 = c(2, 53, 7, 
    0, 0, 0), X415 = c(120, 90, 109, 0, 0, 0), X416 = c(0, 80, 
    0, 0, 0, 0), X417 = c(62, 79, 24, 0, 0, 0), X418 = c(58, 
    156, 30, 0, 0, 0), X419 = c(72, 138, 50, 2, 0, 0), X420 = c(0, 
    0, 0, 0, 0, 0), X421 = c(0, 0, 0, 0, 0, 0), X422 = c(36, 
    143, 43, 0, 0, 0), X423 = c(0, 0, 0, 0, 0, 0), X424 = c(0, 
    0, 0, 0, 0, 0), X425 = c(0, 5, 0, 0, 0, 0), X426 = c(12, 
    109, 0, 18, 26, 0), X427 = c(0, 0, 0, 0, 0, 0), X428 = c(0, 
    0, 0, 0, 0, 0), X429 = c(0, 3, 0, 0, 0, 0), X430 = c(0, 0, 
    362, 0, 0, 0), X431 = c(0, 0, 0, 0, 0, 0), X432 = c(0, 0, 
    685, 0, 0, 0), X433 = c(0, 0, 0, 0, 0, 0), X434 = c(0, 0, 
    0, 0, 0, 0), X435 = c(0, 0, 0, 0, 0, 0), X436 = c(0, 0, 0, 
    0, 0, 0), X437 = c(0, 0, 15, 8, 0, 0), X438 = c(0, 0, 184, 
    0, 0, 0), X439 = c(0, 0, 0, 0, 0, 0), X440 = c(0, 0, 0, 0, 
    0, 0), X441 = c(0, 0, 0, 0, 0, 0), X442 = c(0, 0, 0, 0, 0, 
    0), X443 = c(0, 0, 0, 0, 0, 0), X444 = c(0, 6, 0, 0, 0, 0
    ), X445 = c(0, 0, 0, 0, 0, 0), X446 = c(0, 1, 1, 4, 0, 0), 
    X447 = c(0, 3, 0, 0, 0, 0), X448 = c(0, 1, 0, 0, 0, 0), X449 = c(616, 
    28, 368, 0, 0, 0), X450 = c(0, 0, 1, 0, 0, 0), X451 = c(4098, 
    2120, 3788, 2663, 3524, 0), X452 = c(0, 0, 0, 0, 0, 0), X453 = c(0, 
    66, 0, 0, 0, 0), X454 = c(0, 9, 0, 0, 0, 0), X455 = c(0, 
    1, 0, 0, 0, 0), X456 = c(0, 5, 0, 0, 0, 0), X457 = c(57, 
    111, 36, 0, 0, 0), X458 = c(0, 0, 0, 0, 0, 0), X459 = c(0, 
    54, 68, 0, 0, 0), X460 = c(0, 0, 0, 0, 0, 0), X461 = c(0, 
    0, 0, 0, 0, 0), X462 = c(0, 0, 0, 0, 0, 0), X463 = c(0, 0, 
    0, 0, 0, 0), X464 = c(0, 0, 0, 0, 0, 0), X465 = c(0, 0, 0, 
    0, 0, 0), X466 = c(0, 0, 0, 0, 0, 0), X467 = c(0, 1, 0, 2, 
    0, 0), X468 = c(48, 79, 52, 0, 0, 0), X469 = c(24, 244, 178, 
    0, 0, 0), X470 = c(24, 28, 13, 0, 0, 0), X471 = c(0, 0, 0, 
    0, 0, 0), X472 = c(96, 52, 45, 0, 0, 0), X473 = c(0, 0, 0, 
    102, 0, 0), X474 = c(196, 82, 130, 0, 0, 0), X475 = c(106, 
    30, 33, 0, 0, 0), X476 = c(12, 21, 22, 0, 0, 0), X477 = c(0, 
    0, 0, 0, 172, 0), X478 = c(0, 28, 280, 0, 0, 0), X479 = c(0, 
    27, 310, 0, 0, 0), X480 = c(0, 32, 366, 0, 0, 0), X481 = c(0, 
    7, 0, 0, 0, 0), X482 = c(0, 22, 0, 0, 0, 0), X483 = c(0, 
    1, 0, 0, 0, 0), X484 = c(0, 13, 0, 0, 0, 0), X485 = c(0, 
    2, 0, 0, 0, 0), X486 = c(0, 16, 0, 0, 0, 0), X487 = c(0, 
    6, 0, 0, 0, 0), X488 = c(0, 8, 0, 0, 0, 0), X489 = c(0, 20, 
    0, 0, 0, 0), X490 = c(0, 3, 0, 0, 0, 0), X491 = c(0, 14, 
    0, 0, 0, 0), X492 = c(0, 4, 0, 0, 0, 0), X493 = c(0, 2, 0, 
    0, 0, 0), X494 = c(0, 5, 0, 0, 0, 0), X495 = c(0, 1, 0, 0, 
    0, 0), X496 = c(0, 4, 0, 0, 0, 0), X497 = c(0, 15, 0, 0, 
    0, 0), X498 = c(0, 0, 0, 0, 0, 0), X499 = c(0, 7, 0, 0, 0, 
    0), X500 = c(0, 13, 0, 0, 0, 0), X501 = c(0, 11, 0, 0, 0, 
    0), X502 = c(0, 7, 0, 0, 0, 0), X503 = c(0, 4, 0, 0, 0, 0
    ), X504 = c(0, 0, 0, 0, 0, 0), X505 = c(0, 7, 0, 0, 0, 0), 
    X506 = c(0, 1, 0, 0, 0, 0), X507 = c(0, 1, 0, 0, 0, 0), X508 = c(0, 
    0, 0, 1, 0, 0), X509 = c(0, 6, 0, 0, 0, 0), X510 = c(0, 0, 
    0, 0, 0, 0), X511 = c(0, 2, 0, 0, 0, 0), X512 = c(0, 1, 0, 
    0, 0, 0), X513 = c(0, 14, 0, 0, 0, 0), X514 = c(0, 3, 0, 
    0, 0, 0), X515 = c(237, 171, 188, 0, 0, 0), X516 = c(291, 
    222, 163, 0, 0, 0), X517 = c(5, 36, 9, 0, 0, 0), X518 = c(5, 
    102, 0, 0, 0, 0), X519 = c(0, 0, 0, 0, 0, 0), X520 = c(0, 
    0, 0, 0, 0, 0), X521 = c(0, 0, 0, 0, 0, 0), X522 = c(96, 
    69, 109, 0, 0, 0), X523 = c(236, 0, 118, 0, 1, 0), X524 = c(0, 
    44, 0, 0, 0, 0), X525 = c(0, 0, 0, 0, 0, 0), X526 = c(0, 
    0, 0, 0, 0, 0), X527 = c(0, 0, 0, 0, 0, 0), X528 = c(0, 0, 
    0, 0, 0, 0), X529 = c(0, 62, 15, 0, 0, 0), X530 = c(4, 183, 
    16, 0, 0, 0), X531 = c(3, 187, 19, 0, 0, 0), X532 = c(197, 
    79, 64, 0, 0, 0), X533 = c(27, 255, 25, 0, 0, 0), X534 = c(0, 
    2, 0, 0, 0, 0), X535 = c(0, 20, 0, 0, 0, 0), X536 = c(0, 
    1, 0, 0, 0, 0), X537 = c(0, 10, 0, 0, 0, 0), X538 = c(0, 
    1, 0, 0, 0, 0), X539 = c(0, 4, 0, 0, 0, 0), X540 = c(0, 0, 
    0, 0, 0, 0), X541 = c(0, 6, 0, 0, 0, 0), X542 = c(0, 1, 0, 
    0, 0, 0), X543 = c(0, 12, 113, 0, 0, 0), X544 = c(0, 77, 
    990, 0, 0, 0), X545 = c(6, 27, 14, 0, 0, 0), X546 = c(0, 
    0, 0, 0, 0, 0), X547 = c(0, 0, 0, 0, 0, 0), X548 = c(0, 0, 
    0, 0, 0, 0), X549 = c(0, 0, 0, 0, 0, 0), X550 = c(0, 0, 0, 
    0, 0, 0), X551 = c(0, 0, 0, 0, 0, 0), X552 = c(0, 0, 0, 0, 
    0, 0), X553 = c(301, 0, 0, 0, 0, 0), X554 = c(444, 148, 305, 
    0, 0, 0), X555 = c(0, 0, 0, 0, 0, 0), X556 = c(0, 2, 2, 0, 
    0, 0), X557 = c(0, 0, 0, 0, 0, 0), X558 = c(0, 1, 0, 0, 0, 
    0), X559 = c(0, 0, 0, 0, 0, 0), X560 = c(0, 0, 0, 0, 0, 0
    ), X561 = c(0, 3, 4, 6, 1, 0), X562 = c(120, 77, 26, 0, 0, 
    0), X563 = c(0, 3, 628, 0, 0, 0), X564 = c(709, 104, 0, 0, 
    0, 0), X565 = c(0, 0, 0, 0, 0, 0), X566 = c(95, 59, 581, 
    175, 1219, 0), X567 = c(0, 0, 0, 0, 13, 0), X568 = c(26, 
    7, 0, 26, 39, 0), X569 = c(18, 33, 0, 35, 36, 0), X570 = c(0, 
    2, 41, 39, 1, 0), X571 = c(0, 8, 47, 97, 1, 0), X572 = c(216, 
    291, 52, 279, 688, 0), X573 = c(198, 504, 0, 5, 0, 0), X574 = c(0, 
    0, 0, 0, 0, 0), X575 = c(110, 102, 895, 254, 1682, 0), X576 = c(1, 
    2, 0, 0, 0, 0), X577 = c(10, 18, 0, 0, 0, 0), X578 = c(8, 
    40, 0, 0, 0, 0), X579 = c(0, 0, 0, 0, 0, 0), X580 = c(0, 
    0, 0, 0, 0, 0), X581 = c(0, 0, 0, 0, 0, 0), X582 = c(0, 0, 
    0, 0, 0, 0), X583 = c(0, 0, 216, 0, 0, 0), X584 = c(0, 0, 
    0, 0, 0, 0), X585 = c(0, 0, 0, 0, 0, 0), X586 = c(0, 0, 0, 
    0, 0, 0), X587 = c(0, 0, 0, 0, 0, 0), X588 = c(0, 0, 0, 0, 
    0, 0), X589 = c(0, 0, 0, 0, 0, 0), X590 = c(0, 0, 0, 0, 0, 
    0), X591 = c(31, 32, 0, 52, 213, 0), X592 = c(0, 0, 12, 0, 
    0, 0), X593 = c(0, 0, 0, 0, 0, 0), X594 = c(28, 77, 21, 0, 
    0, 0), X595 = c(0, 0, 0, 0, 0, 0), X596 = c(0, 0, 0, 0, 0, 
    0)), row.names = c(NA, -6L), class = c("tbl_df", "tbl", "data.frame"
))

您在 NMDS 中有一些行包含所有 0 值,这些值显然不适用于 metaMDS

您可以使用 dplyr:

删除包含所有值 == 0 的行
library(dplyr)
NMDS <- NMDS %>% 
  filter_all(any_vars(. != 0))

NMDS <- metaMDS(NMDS, distance="bray")