Chapter 12 Exporting and reporting

In chapter 11 we emphasised one of the less well known strengths of R - the ease with which reports can be written in HTML (web page), PDF, or Word documents.

In this chapter we will demonstrate how tables and figures can be easily exported to PDF and Word documents. To save space, we will not reproduce the whole analysis, but will demonstrate how a report document can be assembled.

Our report will contain two tables - a demographics table and a regression table - and a plot. We will use the colon_s data from the finalfit package. What follows is for demonstration purposes and is not meant to illustrate model building. We will ask, does a particular characteristic of a colon cancer (differentiation) predict 5-year survival?