1 Learning objectives 🎯
- Create a Quarto notebook.
- Initialize type of dynamic documents, header metadata, and document output format.
- Setup your R environment to be able to use and render Quarto documents.
2 Create a new Quarto document
Quarto notebooks can be created and edited in RStudio.
This is only true for RStudio v2022.07 and later. If you use older versions of RStudio on your laptop, you will not have Quarto within RStudio.
In RStudio, you can create a new Quarto document by selecting
File > New File > Quarto Document…
When you create a new Quarto document, RStudio tries to be helpful by allowing you to select a template which explains the different section of an Quarto document. R Studio will enable you select options to pick from to generate a template Quarto document to start from.
The title and the author names are not important at this stage. If the output document type you want is not one of these, do not worry - you can just pick any one and change it manually later.
Let us select HTML to create an html document.
Click on Create to open up a new Quarto (.qmd) document.
3 Setup your R environment
You need to ensure the knitr and rmarkdown packages are available.