← 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

  1. Using your new coding skills, answer the four reflection questions in the next card.
  2. Write your answers as code plus comments in R (or Python) — run them to check they work.
  3. When you're finished, copy and paste your code and any comments into the text box submission for the Canvas assignment.
  4. Graded on completion, not correctness.

❓ The questions

  1. RQ1: Make a data.frame about a pet (or any small set of things you know), containing at least 1 numeric vector and 1 character vector. What ‘rules’ must your data.frame follow?
  2. RQ2: What's a comment in R? What's good vs. bad commenting?
  3. RQ3: What's a package? How do you load it? When?
  4. 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.