September 7, 2026
Code · Week 03
R foundations
Begin with Posit Cloud and R packages, then learn how R represents values, stores objects, combines data in vectors and data frames, and uses functions to calculate results.
Sep 7–11No class Sep 7 · Labor DayLecture 3 · Slides 1–42
ImportantLecture 3: where to begin and stop
Begin at slide 1, the Lecture 3 title slide. Stop at slide 42, 🧪 Apply the R basics, and complete Classwork 2. Descriptive statistics begins in Week 4.
Focus
- Code style, shortcuts, and Posit Cloud workflow
- Values, objects, data types, vectors, and data frames
- Functions, arithmetic, and vectorized operations
Prepare
- Start Lecture 3 from the title slide
- Open your section’s project in Posit Cloud
- Follow the install → load → use workflow
Practice
- Write and run clearly formatted R code
- Create and inspect objects and vectors
- Read function calls and anticipate their results
Learning targets
- Write readable R code and use Posit Cloud shortcuts efficiently.
- Create objects and vectors containing common R data types.
- Explain how vectors become columns in a data frame.
- Convert a value when imported data have the wrong type.
- Read a function call by identifying its function, arguments, and returned value.
- Use arithmetic, mathematical functions, and vectorized operations in R.
Tip
When reading an assignment such as y <- x + 12, evaluate the right side first, then store the result under the name on the left.
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.