♣32♣R Markdown
Once an analysis is finished and conclusions can be drawn, it is important to write up a report. Whether that report will look like a slideshow, scientific paper, or a book, some tasks will be quite laborious. For example, saving all plots, then adding them to the document, and – even worse – do the whole cycle again when something changes (new data, a great idea, etc.).
R Markdown is a great solution. R Markdown is a variant to markdown (that is – despite its name – a “markup language”) that is designed to mix text, presentation, and R-code.
RStudio shortens the learning curve by facilitating the creation of a new document (see Figure 32.1 on page 700) and inserting some essential example text in a new document. Most of the content is self-explanatory and hence one can soon enjoy the great results instead of spending time to learn how R Markdown works.
For example, when creating a new file in RStudio we can select ...
Get The Big R-Book now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.