seq_len中的错误(nrow(i))

时间:2017-05-22 09:04:32

标签: permutation

我在vegan包中使用adonis收到以下错误消息

'nperm' >= set of all permutations: complete enumeration.
Set of permutations < 'minperm'. Generating entire set.
Error in seq_len(nrow(i)) : 
argument must be coercible to non-negative integer
In addition: Warning message:
In seq_len(nrow(i)) : first element used of 'length.out' argument

我有以下dist文件

structure(c(0.0363993060204278, 0.153646867325815, 0.240343525408732, 
0.252037785179205, 0.285288085910786, 0.130845513407629, 0.24076787797198, 
0.253242846053041, 0.286498377946087, 0.301920318321807, 0.280128731379395, 
0.311665395565766, 0.0607868389909555, 0.104081030624619, 0.0776041876382889
), Size = 6L, Labels = c("Day10F1", "Day10F2", "Day10F3", "Day10F4", 
"Day10F5", "Day10F6"), Diag = FALSE, Upper = FALSE, method = "bray", call = 
vegdist(x = deco_UntMet10, 
method = "bray", binary = FALSE), class = "dist")

包含我的分组的第二个data.frame

structure(list(Treatment = structure(c(11L, 11L, 11L, 4L, 4L, 
4L), .Label = c("Chlora", "Gen", "Lin", "Metro", "Metro+Pen", 
"Metro+Rif", "Metro+Rif+Pen", "Pen", "Pen+Rif", "Rif", "Untreated"
), class = "factor"), CDW = c(2.7, 3.3, 3.133, 1.333, 1.333, 
1.367), Chlorophyll = c(34.714, 37.773, 40.54, 4.67, 4.67, 4.934
), EPS = c(0.571, 0.591, 0.597, 0.166, 0.171, 0.179), Day = c(10L, 
10L, 10L, 10L, 10L, 10L)), .Names = c("Treatment", "CDW", "Chlorophyll", 
"EPS", "Day"), row.names = c("Day10F1", "Day10F2", "Day10F3", 
"Day10F4", "Day10F5", "Day10F6"), class = "data.frame")

我想测试两个不同的治疗组是否有显着差异。未经处理与Chlora。我使用了以下代码:

mod5 <- betadisper(vegUntMet10, mtdt_UntMet10$Treatment)
mod5
permutest(mod5, permutations = 1000)
plot(mod5)
boxplot(mod5)
TukeyHSD(mod5)
### so my data is homogenous and so I proceed to test for significance 
between samples
perm5 <- how(nperm = 1000)
setBlocks(perm) <- with(mtdt_UntMet10, Treatment)
adonis(vegUntMet10 ~ mtdt_UntMet10$Treatment, 
strata=mtdt_UntMet10$Treatment)

所以现在我收到错误消息。所以我似乎做错了,因为我之前使用过这段代码来获得相同的完整数据集。 有人可以帮忙吗?感谢

0 个答案:

没有答案