Tukey Graphing Problems in R

岁酱吖の 提交于 2020-02-08 07:01:05

问题


I'm having trouble extracting and graphing a Tukey test that I did. I did a fairly basic one on an ANOVA but I only want to plot the significant mean differences. When I use the plain

Tukey <- TukeyHSD(x=aov.out, 'Species', conf.level=0.95) plot(Tukey)

The result is

Is there any way to remove all the insignificant mean levels? When I attempted to, I was forced to turn it into a dataframe, which then could not be plotted in the same way.

Tukey <- Tukey[[1]][row_to_keep,]

NOTE: No packages were installed.


回答1:


Better late than never I hope... You can just subset the matrix inside the TukeyHSD object.

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


来源:https://stackoverflow.com/questions/31838046/tukey-graphing-problems-in-r

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