Setup
Before You Start
Applied R introduces programming from the beginning across eight lessons. Each lesson is planned for 100 minutes, including a 10-minute break. You should be comfortable creating folders and locating files, but no previous R experience is required. Prepare the software and data below before the first session.
Install compatible versions of the following on your computer, using your organisation’s software arrangements on a managed device:
- the R software itself, and
- RStudio Desktop.
If you already have R and RStudio working, use the checks below rather than reinstalling them. If installation is unavailable, tell the organiser before the session so that an appropriate shared-screen or supported-environment fallback can be arranged.
Create a Project and Obtain the Data
- Create a folder called
applied_Rin a location you can find again. - In RStudio, create a project in that existing folder (File > New Project > Existing Directory). See the official Projects guide.
- Create a
datafolder inside the project. - Download gapminder_data.csv into
data. This is a CSV file, so it does not need unzipping. - Create and save an R script in the project folder. The loops and tidyverse lessons also use data supplied by the
gapminderpackage.
Prepare the Lesson Packages
Lesson 4 uses gapminder, dplyr and readr. Installing tidyverse supplies those packages and tidyr for lessons 5 and 6.
Run this once in the R console if these packages are not already available:
install.packages(c("gapminder", "tidyverse"))The retained examples in lesson 5 and lesson 6 also use the following packages. Prepare them before those lessons:
install.packages(c("rmarkdown", "openxlsx", "gridExtra", "ggExtra", "knitr"))Package installation needs network access. If you see an error, retain the message and ask the organiser which environment or installation route to use. Install packages once; load them again when starting a new R session.
Check Your Setup
With the applied_R project open, run:
library(gapminder)
library(tidyverse)
file.exists("data/gapminder_data.csv")
head(gapminder::gapminder)
sessionInfo()The file check should return TRUE, and the dataset should print without a package error. If the file is missing, check getwd() and the location of the downloaded CSV. Keep sessionInfo() with any request for help so that the R and package versions are visible.
The iteration and data-analysis sessions create an output folder for derived files. Keep the course input file unchanged and inspect output destinations before rerunning file-writing examples. The complete course contains eight lessons; the former variables page is now lesson 2 on research data.
Digital Notebook and Dashboard Access
For lesson 7, install the Quarto CLI if it is unavailable in RStudio. Check quarto --version in a terminal, then open report.qmd and use Render. The report needs knitr and rmarkdown; HTML output avoids requiring a PDF/LaTeX installation.
For lesson 8, install Shiny if needed:
install.packages("shiny")With the extracted project open, run shiny::runApp("."). Country/year controls, a figure and table should appear in a browser. Keep the R process running and use Stop/Esc to finish. Install software before class; use a partner’s screen or instructor demonstration if access fails. No paid hosting account is required for the local exercises.
Use Shiny’s getting-started guide for further help. A rendered report and a live Shiny service have different sharing requirements; deployment is outside classroom setup.
After Setup
Start with session 1: R Foundations. The learner Additional Material page provides a Gapminder practice workflow and further references. Use Digital Skills Clinics for follow-up help with a specific R or data task.