Build with R · Week 04

R Fundamentals

Finish the R-fundamentals sequence with vectors, data frames, functions, and vectorized operations.

Sep 14–18Lecture 3, from slide 31Classwork 2
ImportantWeek 4 sequence
  1. Resume Lecture 3 at slide 31: ➡️ A vector stores values of one type, and continue through slide 45.
  2. Use Classwork 2 to practice the R fundamentals.
  3. Begin Homework 1.

Focus

  • Vectors, data frames, factors, and type conversion
  • Functions, arithmetic, and vectorized operations
  • Reading and writing clear R expressions

Prepare

  • Open Lecture 3 at slide 31
  • Bring Classwork 2 and your R script
  • Open your section’s project in Posit Cloud

Practice

  • Create and inspect vectors and data frames
  • Use functions and vectorized operations

Learning targets

  • Create vectors and explain why one vector stores values of a common type.
  • Explain how vectors, factors, and data frames organize values in R.
  • Read function calls and use vectorized arithmetic.

Lecture slides

TipLecture slide shortcuts

Click inside the slide preview, then use:

  • the visible ←/→ controls to page through the slides;
  • your mouse wheel or trackpad to keep scrolling the weekly page;
  • M to open the menu;
  • F to enter fullscreen;
  • E to enter or exit PDF export mode;
  • Ctrl + Shift + F to search within the slides;
  • Esc to exit the menu or fullscreen; and
  • T to switch between dark and light mode.
Lecture 3 · R Fundamentals · Slides 31–45View slides in new tab

This week’s materials

Back to top