-2

我尝试使用上一篇文章中的以下代码:Tukey Graphing Problems in R

SigOnly <- Tukey 
SigOnly$species <- SigOnly$species[SigOnly$species[,'p adj'] < .05, ]
plot(SigOnly)

但是在尝试绘图时出现以下错误:

xy.coords(x, y, xlabel, ylabel, log) 中的错误:“x”和“y”长度不同

我可能做错了什么?

4

1 回答 1

0

由于您不提供带有示例数据的可重现代码,因此这里是一个使用warpbreaks示例数据的示例:

fm1 <- aov(breaks ~ wool + tension, data = warpbreaks)
res <- TukeyHSD(fm1, "tension", conf.level = 0.95)

# Filter rows with padj < 0.05
res$tension <- res$tension[res$tension[, 4] < 0.05, ];

# Plot results
plot(res);

在此处输入图像描述

于 2018-04-27T04:24:28.340 回答