我发现yfrac
包中plot.msets
函数中的SuperExactTest
参数无法正常工作。正如作者所说,此参数可以控制画布绘制图形的比例。但是,测试结果与预期不符。 Y轴和底部的圆圈已移动,但该条没有移动。以下是测试和结果。
library(SuperExactTest)
x=list(S1=letters[1:20], S2=letters[10:26], S3=sample(letters,10), S4=sample(letters,10))
obj=supertest(x,n=26)
pdf("test.pdf",height=10,width=10)
plot(obj,Layout="landscape",yfrac=0.8,x.pos=c(0.1,0.9),y.pos=c(0.1,0.9),title="yfrac0.8")
plot(obj,Layout="landscape",yfrac=0.5,x.pos=c(0.1,0.9),y.pos=c(0.1,0.9),title="yfrac0.5")
dev.off()
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] SuperExactTest_1.0.0 VennDiagram_1.6.20 futile.logger_1.4.3 reshape2_1.4.3 ggsignif_0.4.0
[6] ggplot2_3.0.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.17 rstudioapi_0.7 bindr_0.1.1 magrittr_1.5 tidyselect_0.2.4
[6] munsell_0.5.0 colorspace_1.3-2 R6_2.2.2 rlang_0.2.1 stringr_1.3.1
[11] plyr_1.8.4 dplyr_0.7.5 tools_3.5.0 gtable_0.2.0 lambda.r_1.2.3
[16] withr_2.1.2 lazyeval_0.2.1 assertthat_0.2.0 digest_0.6.15 tibble_1.4.2
[21] crayon_1.3.4 bindrcpp_0.2.2 formatR_1.5 purrr_0.2.5 futile.options_1.0.1
[26] glue_1.2.0 labeling_0.3 stringi_1.1.7 compiler_3.5.0 pillar_1.3.0
[31] scales_1.0.0 pkgconfig_2.0.1