-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
R for Data Science Cookbook (n)
By :
RStudio has an R Markdown workflow built in; we can use its GUI to create markdown reports in HTML, PDF, slide, or Microsoft Word format. In this recipe, we will introduce how to build an R Markdown report with RStudio.
Ensure you have installed the latest versions of R and RStudio on your operating system. If you have not yet installed RStudio, please visit the following URL to download the most recent version:
Please perform the following steps to create an R Markdown report:
First, click on File | New File | R Markdown on the menu bar:

Figure 1: Create an R Markdown report
Next, select the document type in the left-hand side menu, then fill in the Title and Author, and choose the output format in the right-hand side menu:

Figure 2: Fill in the meta information of an R Markdown report
Moving on, we can now see a markdown document with a YAML header and content in markdown syntax. You can now...
Change the font size
Change margin width
Change background colour