Notebook of Reading Books: R in Action_Chapter 22.
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
22.1. A template approach to reports
- Four types of template
- R Markdown
- ODT
- DOCX
- LaTex
22.2. Creating dynamic reports with R and Markdown
-
Step by Step
- install.packages(“rmarkdown) for older versions of RStudio
- install.packages(“xtable”), which can attractively formats data frames and matrices for inclusion in reports.
- install MacTeX software to generate PDF documentation
-
To generate a nicely formatted PDF document for the womenPDF.Rmd template.
-
To generate an attractive word document for the womenWord.Rmd template.
22.3. Creating dynamic reports with R and LaTeX
-
LaTeX is powerful, But it requires significant study to use effectively and creates documents in formats (PDF, DVI, PS) that can’t be edited.
-
With the text file drugs.Rnw:
22.4. Creating dynamic reports with R and Open Document
- In the
odfWeave()
package.
22.5. Creating dynamic reports with R and Microsoft Word
- It’s only work on Windows platforms.
- In the
R2wd()
package.
Attach is the Script of chapter22.
Show me the code
|
|