To generate reports using rmarkdown and knitr, follow these steps:
- Open RStudio.
- Create a new R Markdown document as follows:
- Select the menu option by navigating to File | New File | R Markdown.
- Enter the title as Introduction, leave the other defaults as is, and click on OK.
This generates a sample R Markdown document that we can edit to suit our needs. The sample document resembles the following screenshot:
- Take a quick look at the document. You do not need to understand everything in it. In this step, we are just trying to get an overview.
- Generate an HTML document based on the markdown file. Depending on the width ...