Home  >>  Archives  >>  Volume 16 Number 4  >>  pr0063

The Stata Journal
Volume 16 Number 4: pp. 938-963



Subscribe to the Stata Journal
cover

Rethinking literate programming in statistics

E. F. Haghish
Center for Medical Biometry and Medical Informatics
University of Freiburg
Freiburg, Germany
and
Department of Mathematics and Computer Science
University of Odense
Odense, Denmark
haghish@imada.sdu.dk
Abstract.  Literate programming is becoming increasingly trendy for data analysis because it allows the generation of dynamic-analysis reports for communicating data analysis and eliminates untraceable human errors in analysis reports. Traditionally, literate programming includes separate processes for compiling the code and preparing the documentation. While this workflow might be satisfactory for software documentation, it is not ideal for writing statistical analysis reports. Instead, these processes should run in parallel. In this article, I introduce the weaver package, which examines this idea by creating a new log system in HTML or LATEX that can be used simultaneously with the Stata log system. The new log system provides many features that the Stata log system lacks; for example, it can render mathematical notations, insert figures, create publication-ready dynamic tables, and style text, and it includes a built-in syntax highlighter. The weaver package also produces dynamic PDF documents by converting the HTML log to PDF or by typesetting the LATEX log and thus provides a real-time preview of the document without recompiling the code. I also discuss potential applications of the weaver package.
Terms of use     View this article (PDF)

View all articles by this author: E. F. Haghish

View all articles with these keywords: weave, div, img, txt, tbl, weaver, weaving, literate programming, dynamic documents, reproducible research, log, HTML, LaTeX

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS