Chapter 22. Creating dynamic reports


This chapter covers

  • Publishing results to the web
  • Incorporating R results into Microsoft Word or Open Document reports
  • Creating dynamic reports, where changing the data changes the report
  • Creating publication quality documents with R, Markdown, and LaTeX

Welcome to the final chapter! You’ve accessed your data, cleaned it up, described its characteristics, modeled the relationships, and visualized the results. The next step is to

  1. Relax and perhaps go to Disney World.
  2. Communicate the results to others.

If you chose A, please take me with you. If you chose B, welcome to the real world.

Research doesn’t end when the last statistical analysis or graph is finished. You’ll almost always have to communicate the results to others. This means incorporating the analyses into a report of some kind.

There are three common report scenarios. In the first, you create a report that includes your code and the results, so that you can remember what you did six months from now. It’s easier to reconstruct what was done from a single comprehensive document than from a set of related files.

In the second scenario, you have to generate a report for a teacher, a supervisor, a client, a government agency, an internet audience, or a journal editor. Clarity and attractiveness matter, and the report may only need to be created once.

22.1. A template approach to reports

22.2. Creating dynamic reports with R and Markdown

22.3. Creating dynamic reports with R and LaTeX

22.4. Creating dynamic reports with R and Open Document

22.5. Creating dynamic reports with R and Microsoft Word

22.6. Summary