【发布时间】:2014-08-23 06:31:31
【问题描述】:
我生成了一个箱线图,并使用wilcox.test 测试了向量 x1 和 x2 的均值差异。如何在箱线图中实现测试结果?
> x1 <- rnorm(1000)
> x2 <- rnorm(1000) +10
> wilcox.test(x1,x2, paired=TRUE)
Wilcoxon signed rank test with continuity correction
data: x1 and x2
V = 0, p-value < 2.2e-16
alternative hypothesis: true location shift is not equal to 0
> boxplot(x1, x2)
谢谢你们!
R 版本 3.1.0 (2014-04-10) -- 《春之舞》
平台:x86_64-w64-mingw32/x64(64 位),Windows 7
【问题讨论】: