library(multcomp)
attach(cholesterol)
fit<-aov(response~trt)
a<-summary(fit)
detach(cholesterol)
a
Df Sum Sq Mean Sq F value Pr(>F)
trt 4 1351.4 337.8 32.43 9.82e-13 ***
Residuals 45 468.8 10.4
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1''1
我们要提取Pr(>F)下的9.82e-13,
为什么提取方式是a[[1]]["Pr(>F)"][[1]][1]?
这是我试了两个小时试出来的。


雷达卡







京公网安备 11010802022788号







