Week 1 · Tuesday, Sep 29 · 9:50-10:55 am · Self-guided
By 10:55 you should have a machine that is ready for the whole quarter:
tidyverse packages installedWork at your own pace, top to bottom. Done early? Help a neighbor. Explaining a fix is great practice.
No printout this week. The DS grade cycle starts next Tuesday.
Open Positron. In the Console, type:
You should see something like [1] "R version 4.x.x (...)".
Warning
No R in the top right corner, or no Console? Click the interpreter picker (top right) and choose R. If it’s not listed, R isn’t installed: go back to cloud.r-project.org, install it, and restart Positron.
In Positron, open a terminal: Terminal → New Terminal. Type:
For DS, lessons, and in-class work, no AI suggestions of any kind.
assistant: make sure Positron Assistant is not enabledinline suggest: uncheck Editor › Inline Suggest: EnabledNote
Why? Your first weeks build the habits you’ll later use to judge AI output: reading code and working out errors yourself.
stat266a somewhere you’ll find it (for example, Documents/stat266a)stat266aweek01Tip
Folder and file names: lowercase, no spaces, no accents. week01/first_script.R is good. Week 1/My Script (final).R will cause trouble later.
File → New File → R File. Type this, then save it as week01/first_script.R:
Put your cursor on a line and press Cmd + Enter (Mac) or Ctrl + Enter (Windows/Linux). The result appears in the Console.
In the Console (not the script), type:
This downloads many packages, so it can take a few minutes. Then check:
A message listing the attached packages (ggplot2, dplyr, …) means it worked. We’ll use these from Week 4 on.
| You see… | Try… |
|---|---|
Would you like to use a personal library instead? |
Answer yes (both questions) |
Do you want to install from sources the packages which need compilation? |
Answer no |
| Positron can’t find R | Restart Positron. If that fails, reinstall R, then restart |
git: command not found (Windows) |
Close and reopen Positron after installing Git for Windows |
| Mac Command Line Tools install stalls | Run xcode-select --install in the Terminal |
| Anything else | Copy the exact error message and ask a neighbor, then me |
A good help request includes:
This works with classmates, on Ed Discussion, and in office hours. It’s also the first step of the help routine we practice in Week 2.
All done? Walk around and help someone who isn’t. See you at 1:30 pm for our first R lecture. Bring your laptop, charged!

STAT 266A · Fall 2026 · UC Santa Cruz