← All activities
Workshop 1 · In-Class Activity
In-Class Activity: Statistical Coding
An in-class activity from the course slides — reproduced here so you can find it again after class.
📋 What to do
- Using your new coding skills, answer the four reflection questions in the next card.
- Write your answers as code plus comments in R (or Python) — run them to check they work.
- When you're finished, copy and paste your code and any comments into the text box submission for the Canvas assignment.
- Graded on completion, not correctness.
❓ The questions
- RQ1: Make a
data.frameabout a pet (or any small set of things you know), containing at least 1 numeric vector and 1 character vector. What ‘rules’ must yourdata.framefollow? - RQ2: What's a comment in R? What's good vs. bad commenting?
- RQ3: What's a package? How do you load it? When?
- RQ4: What's an ‘object’ in R? Why do we use them? What can be an object?
📮 Submit
Submit answers on CANVAS (1 pt) — graded on completion; your deadline is on the Canvas assignment.
Note: these instructions are the current version — the activity is written and kept up to date on this page, links to slide decks and helper materials included. Submit on Canvas; the due date and your grade live there.