Intro to R
  • Home
  • Syllabus
  • Lectures
  • Homework
  • Software Setup

On this page

  • Info and Materials
  • Learning Objectives
  • Before Class
  • Readings

Lecture 8: Data Structures, Base R

Published

July 22, 2025

Info and Materials

  • Date: July 22, 2025
  • Topics: Intro to Data Structures and Base R
  • Slides: View Slides
  • Code: No in-class code to download

Learning Objectives

  • Understand what Base R is, and how it differs from the Tidyverse
  • Identify R data types and structures
  • Explore R vectors
  • Subset data using Base R syntax (optional)

Before Class

  • Review Lecture 7 materials to get ready for today’s in-class quiz
  • Bring your laptop to every class

Readings

Skim the readings before or after class to get the big picture and prep for quizzes and assignments:

  • Chapter 20 “Vectors” in “R for Data Science” 1st Edition. I assigned the 1st Edition because I find it a bit clearer on this topic than the 2nd Edition, but you might want to take a look also at Chapter 12 “Logical Vectors” and Chapter 13 “Numbers” of the 2nd Edition and decide what you prefer. Either works!
  • Chapter 27 “A field guide to base R” in “R for Data Science” 2nd Edition.