Journal of Data Science logo


Login Register

  1. Home
  2. Issues
  3. Volume 19, Issue 1 (2021)
  4. Reproducible Science with LATEX

Journal of Data Science

Submit your article Information
  • Article info
  • More
    Article info

Reproducible Science with LATEX
Volume 19, Issue 1 (2021), pp. 111–125
Haim Bar   HaiYing Wang  

Authors

 
Placeholder
https://doi.org/10.6339/21-JDS998
Pub. online: 28 January 2021      Type: Computing In Data Science     

Received
1 August 2020
Accepted
1 November 2020
Published
28 January 2021

Abstract

This paper proposes a procedure to execute external source codes from a LATEX document and include the calculation outputs in the resulting Portable Document Format (pdf) file automatically. It integrates programming tools into the LATEX writing tool to facilitate the production of reproducible research. In our proposed approach to a LATEX-based scientific notebook the user can easily invoke any programming language or a command-line program when compiling the LATEX document, while using their favorite LATEX editor in the writing process. The required LATEX setup, a new Python package, and the defined preamble are discussed in detail, and working examples using R, Julia, and MatLab to reproduce existing research are provided to illustrate the proposed procedure. We also demonstrate how to include system setting information in a paper by invoking shell scripts when compiling the document.

Supplementary material

 Supplementary Material
Detailed examples and documentation are available in a GitHub repository at https://github.com/Ossifragus/runcode. The runcode LATEX package is available via CTAN, and the talk2stat Python package for the server-mode is available at https://pypi.org/project/talk2stat/.

References

 
Allaire J, Xie Y, McPherson J, Luraschi J, Ushey K, Atkins A, et al. (2020). rmarkdown: Dynamic Documents for R. package version 2.1.
 
Bates D, Maechler M (2019). Matrix: Sparse and Dense Matrix Classes and Methods. R package version 1.2-16.
 
Chang W, Cheng J, Allaire J, Xie Y, McPherson J (2020). shiny: Web Application Framework for R. R package version 1.5.0.
 
Csardi G, Nepusz T, et al. (2006). The igraph software package for complex network research. InterJournal, complex systems, 1695(5): 1–9.
 
Gentleman R, Temple Lang D (2007). Statistical analyses and reproducible research. Journal of Computational and Graphical Statistics, 16(1): 1–23.
 
Ioannidis JPA (2005). Why most published research findings are false. PLOS Medicine, 2(8).
 
Ji P, Jin J (2016). Coauthorship and citation networks for statisticians. Annals of Applied Statistics, 10(4): 1779–1812.
 
Jin J (2015). Fast community detection by SCORE. Annals of Statistics, 43(1): 57–89.
 
Knuth DE (1984). Literate programming. The Computer Journal, 27(2): 97–111.
 
Leisch F (2002). Sweave: Dynamic generation of statistical reports using literate data analysis. In: Compstat, 575–580. Springer.
 
Schulte E, Davison D, Dye T, Dominik C (2012). A multi-language computing environment for literate programming and reproducible research. Journal of Statistical Software, 46(3): 1–24.
 
Xie Y (2014). knitr: A comprehensive tool for reproducible research in R. In: Implementing Reproducible Computational Research (V Stodden, F Leisch, RD Peng, eds.). Chapman and Hall/CRC. ISBN 978-1466561595.
 
Xie Y (2015). Dynamic Documents with R and knitr. Chapman and Hall/CRC, Boca Raton, Florida, 2nd edition edition. ISBN 978-1498716963.
 
Xie Y (2020). knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.28.
 
Xie Y, Allaire J, Grolemund G (2018). R Markdown: The Definitive Guide. Chapman and Hall/CRC, Boca Raton, Florida. ISBN 9781138359338.
 
Zeileis A (2014). ineq: Measuring Inequality, Concentration, and Poverty. R package version 0.2-13.

PDF XML
PDF XML

Copyright
© 2021 The Author(s).
This is a free to read article.

Keywords
literate programming reproducibility scientific notebook --shell-escape

Metrics
since February 2021
2720

Article info
views

1185

PDF
downloads

Export citation

Copy and paste formatted citation
Placeholder

Download citation in file


Share


RSS

Journal of data science

  • Online ISSN: 1683-8602
  • Print ISSN: 1680-743X

About

  • About journal

For contributors

  • Submit
  • OA Policy
  • Become a Peer-reviewer

Contact us

  • JDS@ruc.edu.cn
  • No. 59 Zhongguancun Street, Haidian District Beijing, 100872, P.R. China
Powered by PubliMill  •  Privacy policy