Session 1 (“Beginner”)

This first session provides a gentle introduction to R for those new to the language. We’ll explore what makes R a widely-used tool for data analysis and how it compares to alternatives such as Python, Stata, and SPSS.

We’ll cover essential building blocks of the R language, including using the console, installing packages, writing scripts, and navigating help files. You will learn about how to handle different data types, such as missing values and factors, and techniques for subsetting objects. We’ll finish by taking a first look at using and creating functions in R.

Timetable

tinytable_lg8l2rfh4rnln5tb2u2i
Time Topic
13:00 — 13:20 Welcome to the course
What to expect when learning R
13:20 — 14:00 What are R and RStudio?
How does R compare to other languages?
14:00 — 14:40 Data types
Objects and object assignment
14:40 — 15:20 Break and Practical 1
15:20 — 15:40 Data frames
Importing and exporting data
15:40 — 16:10 Subsetting
16:10 — 16:40 Break and Practical 2
16:40 — 16:55 Using functions in R
Writing your own functions
16:55 — 17:00 Wrap up and looking ahead

Lectures

  1. Welcome to the course
  2. Introduction to R and RStudio
  3. Objects and data types
  4. Data frames and subsetting

Session recording

You can download the lecture recording from the HDR Futures page.