R markdown and its application in repetitive hospital statistical analysis report
Han Dong1, Ye Yunshao2
1 The Third Affiliated Hospital of Southern Medical University, Guangzhou 510630, China;
2 Guangzhou Health Technology Identification & Human Resources Assessment Center, Guangzhou 510080, China
Abstract:It is often necessary to write periodic reports in hospital statistical work, but the separation of data analysis and completed reports will lead to low efficiency and errors. This article introduces the basic syntax of markdown and the Rlanguage rmarkdown and knitr software packages, taking the common content of hospital statistics as an example, in order to demonstrate the function of generating analysis reports based on R markdown documents. Using R markdown documents to write periodic reports can effectively improve the work efficiency of hospital statisticians, reduce the error rate of reports and easily trace the source of errors.
韩栋,叶韵韶. R markdown在重复性医院统计分析报告中的应用[J]. 中国医院统计, 2020, 27(6): 554-557.
Han Dong, Ye Yunshao . R markdown and its application in repetitive hospital statistical analysis report. journal1, 2020, 27(6): 554-557.
[1]PENG R D. Reproducible research in computational science[J]. Science, 2011, 334(6060):1226-1227.
[2]XIE Y. R markdown: dynamic documents for R[CP/OL]. [2020-08-19].https://CRAN.Rproject.org/package=R markdown.
[3]BAUMER B, CETINKAYARUNDEL M, BRAY A, et al. R markdown: integrating a reproducible analysis tool into introductory statistics[J]. Statistics, 2014, 5(3): 381-393.
[4]XIE Y H, ALLAIRE J J, GROLEMUND G. R markdown[M]. Chapman and Hall/CRC, 2018.
[5]XIE Y. Knitr: a generalpurpose package for dynamic report generation in R[CP/OL].[2020-08-19].https://CRAN.Rproject.org/package=knitr.
[6]GANDRUD C. Getting Started with R, RStudio, and knitr/rmarkdown[M]//Reproducible Research with R and RStudio. Chapman and Hall/CRC, 2018: 29-63.
[7]XIE Y. Rticles: article formats for R markdown[CP/OL].[2020-08-19].https://CRAN.Rproject.org/package=rticles.