R for Novices - Gapminder Lessons

Welcome!

Welcome to the R for Novices lesson series using the Gapminder dataset.

This is an adapted version of the Software Carpentry R-novice-gapminder course, designed to provide a clearer, more focused learning experience. These lessons are a supplementary resource for R programming workshops and independent learning - use them to supplement your teaching or guide your learning journey.

Each lesson is available in two formats: - Page - Detailed content for reading and reference - Slides - Presentation format for following along in workshops or for teaching

Available Lessons

  1. Introduction to RStudio (Slides) - Get familiar with the RStudio interface and R fundamentals
  2. Project Management with RStudio (Slides) - Organize your work with RStudio projects and best practices
  3. Seeking Help (Slides) - Learn how to find answers and get help when you’re stuck
  4. Data Structures (Slides) - Understand R’s core data types and structures
  5. Exploring Data Frames (Slides) - Learn to manipulate and explore data frames in R
  6. Subsetting Data (Slides) - Master techniques for extracting subsets of data
  7. Control Flow (Slides) - Make decisions with if/else statements and repeat operations with loops
  8. Creating Publication-Quality Graphics with ggplot2 (Slides) - Build professional visualizations using the grammar of graphics
  9. Vectorization (Slides) - Operate on all elements of a vector at once for efficient code
  10. Functions Explained (Slides) - Understand and create your own R functions
  11. Writing Data (Slides) - Learn to export and save your data
  12. Data Frame Manipulation with dplyr (Slides) - Master data wrangling with dplyr verbs and pipes
  13. Producing Reports With knitr (Slides) - Create reproducible reports integrating code and narrative
  14. Writing Good Software (Slides) - Apply best practices for readable, reusable R code

About the Slides

The slides on this site are built with Quarto, an open-source publishing system that lets you write content in plain text and turn it into websites, slides, PDFs, and more - all from the same source.

The slide decks use Quarto’s reveal.js format, and they’re honestly pretty cool. You can:

  • Navigate horizontally through main topics or vertically through sub-topics
  • Press F to go full screen
  • Press S to open speaker/presentation mode (with notes and a timer)
  • Hit E to switch to a PDF-friendly view, then print or save as PDF
  • Use the built-in chalkboard to draw on slides during a live session

It’s an excellent setup for teaching - everything lives in one place, looks clean, and just works in the browser. No PowerPoint, no extra software.

About

This is a decluttered adaptation of Software Carpentry’s R programming course, optimized for teaching and learning. The content has been streamlined to provide clear, focused lessons while maintaining the core learning objectives.

Credits

Getting Started

To follow along with these lessons, you’ll need:

  • R (version 4.0 or higher)
  • RStudio (recommended)
  • The gapminder package

Install the gapminder package with:

install.packages("gapminder")