Pre-tutorial instructions
Getting ready for D-Day
Christophe will be around on Monday 8th July in the morning - you can reach out to meet if you have any problems to share ahead of the tutorial.
He can be contacted beforehand - See profile at @cderv.
Before the tutorial, please follow these steps:
Before Tutorial day
Setting up your environment:
Download and install the latest versions of R, RStudio and Quarto:
A recent version of R (4.4 or higher)
The latest version of RStudio (
2024.04.2-764
or higher)The latest version of Quarto
1.5
available at https://quarto.org/docs/download/
Install the following packages:
# For the exercises # (dplyr and ggplot2 should be sufficient if you don't want the entire tidyverse) <- c("rmarkdown", "palmerpenguins", "gt", "tidyverse") pkg_list # R base install.packages(pkg_list) # or using pak ::pkg_install(pkg_list) pak
If you prefer to have the files locally in advance:
Download
exercises.zip
. This compressed folder contains various resources that may be useful for the exercises. Unzip it on your desktop or in a location that you can easily locate on your computer. You will be able to simply copy and paste the files you need throughout the tutorial.Download
examples-correction.zip
. This is the equivalent of exercise solutions - Do not look in advance if you really want to practice on the day. This compressed folder contains various resources used as examples and demonstrations. Unzip it on your desktop or in a location that you can easily locate on your computer. You will be able to simply copy and paste the files you need throughout the tutorial.
Create a dedicated folder on your environment for the tutorial to store the exercises, your notes and to be able to do the exercises in a healthy environment.
Don’t create an RStudio folder because we’ll be creating different projects for the exercises, and creating RStudio sub-projects doesn’t work well.
Example of organization:
> tuto-quarto-user-2024
|-- notes/
|-- exercises/
|-- rstudio-project1/
|-- quarto-project1/
|-- README.md (to note the context of these files)
What you need to know (or revise) to feel at ease
Assumption for the tutorial: You know R Markdown and you know Markdown syntax.
- Markdown syntax for Pandoc
This is the same as R Markdown:
https://bookdown.org/yihui/rmarkdown/markdown-syntax.htmlIt is also documented on Quarto website:
https://quarto.org/docs/authoring/markdown-basics.html
- Include R code with knitr
R code chunks:
https://bookdown.org/yihui/rmarkdown/r-code.htmlWhat is an R Markdown file?
https://bookdown.org/yihui/rmarkdown-cookbook/rmarkdown-anatomy.html
Check your setup
Here are a few tips for checking your installation if you’ve installed quarto yourself:
quarto check install
must operate without error$ quarto check install 1.5.53 Quarto [>] Checking Quarto installation......OK : 1.5.53 Version: C:\Users\chris\scoop\apps\quarto\current\bin Path: 1252 CodePage [>] Checking tools....................OK : v2024.07.03 TinyTeX: 869685 Chromium [>] Checking LaTeX....................OK : TinyTex Using: C:\Users\chris\AppData\Roaming\TinyTeX\bin\windows\ Path: 2024 Version [>] Checking basic markdown render....OK
It is better if you have TinyTeX installed to work with Quarto (https://quarto.org/docs/output-formats/pdf-engine.html#installing-tex), but not mandatory for this tutorial.
quarto check knitr
must work without error$ quarto check knitr 1.5.53 Quarto (-) Checking R installation........... [>] Checking R installation...........OK : 4.4.0 Version: C:/PROGRA~1/R/R-44~1.0 Path: LibPaths- C:/Users/chris/AppData/Local/R/win-library/4.4 - C:/Program Files/R/R-4.4.0/library : 1.47 knitr: 2.27 rmarkdown [>] Checking Knitr engine render......OK