Dynamic documents with R and knitr
By: Yihui Xie
Series: Chapman &  Hall/CRC the R series
Publisher: CRC Press, Taylor & Francis
Published: 2014
Place of publication: Boca Raton
Language: eng
Number of pages: 190
ISBN-13: 9781482203530
Subjects: Statistics; Data processing; Technical reports; Corporation reports; Mathematical statistics; Computer programs; Technical writing; R (Computer program language); MATHEMATICS / Probability & Statistics / General; Knitr
Description: "Suitable for both beginners and advanced users, this book shows you how to write reports in simple languages such as Markdown. The reports range from homework, projects, exams, books, blogs, and web pages to any documents related to statistical graphics, computing, and data analysis. While familiarity with LaTeX and HTML is helpful, the book requires no prior experience with advanced programs or languages. For beginners, the text provides enough features to get started on basic applications. For power users, the last several chapters enable an understanding of the extensibility of the knitr package."--

"Preface We import a dataset into a statistical software package, run a procedure to get all results, then copy and paste selected pieces into a typesetting program, add a few descriptions and finish a report. This is a common practice of writing statistical reports. There are obvious dangers and disadvantages in this process: 1. it is error-prone due to too much manual work; 2. it requires lots of human efforts to do tedious jobs such as copying results across documents; 3. the workflow is barely recordable especially when it involves GUI (Graphical User Interface) operations, therefore it is difficult to reproduce; 4. a tiny change of the data source in the future will require the author(s) to go through the same procedure again, which can take nearly the same amount of time and effort; 5. the analysis and writing are separate, so close attention has to be paid to the synchronization of the two parts; In fact, a report can be generated dynamically from program code. Just like a software package has its source code, a dynamic document is the source code of a report. It is a combination of computer code and the corresponding narratives. When we compile the dynamic document, the program code in it is executed and replaced with the output; we get a final report by mixing the code output with the narratives. Because we only manage the source code, we are free of all the possible problems above. For example, we can change a single parameter in the source code, and get a different report on the fly."--
Notes: Includes bibliographical references (pages 185-188) and index.

Includes bibliographical references and index.