我生成了一个箱线图并测试了向量 x1 和 x2 与wilcox.test
. 如何在箱线图中实现测试结果?
> 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