Getting started with R Markdown in RStudio
Let's recapitulate, that R Markdown uses various technologies and is seamlessly embedded in RStudio.
Creating your first R Markdown document
To create an R Markdown document, perform the following steps:
- First, click on the new file icon in RStudio and select R Markdown....
- This will open a new popup window where you can adjust a variety of settings.
- For our first document, we will leave all these settings as they are. You may change the Title and the Author name.
- After hitting the OK button, RStudio will automatically open a new prefilled
.Rmd
file. - For a first test run, just click on the Knit HTML button with the small ball of yarn icon before the corresponding text.
As you can see, the knitted file opens by default in a preview window.
- Instead of using the default option, it is recommended that you change the settings so that RStudio opens the output of a knitted
.Rmd
file in a dedicated viewer pane. Click on the small down-pointing arrow, to the...