Lecture 9: Control Flow 1
Info and Materials
- Date: July 24, 2025
- Topics: Writing conditionals with if, else, and else if
- Slides: View Slides
- Code:
usethis::use_course("csp-materials/if-else")
Learning Objectives
- Define what control structures are and why they matter
- Introduce one type of control structure: conditional statements
- Practice using conditional statements in R
Before Class
- Review Lecture 8 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 13 “Control Structures” in “R programming for Data Science” (Notice this is not our regular book!)