OPEN EDUCATIONAL RESOURCE · INSTRUCTOR RESOURCES

Preparing, Teaching and Assessing R

An independent, openly available instructor guide using beginner R and first-year psychology statistics examples.

Updated: 5 November 2026 · Independent ferdo Lab material; not an official UCL syllabus or exam

Core instructional principle

Make the learner construct a solution: define a problem → plan steps → predict output → write code → inspect data → debug → interpret. The instructor asks questions and gives graded hints rather than taking the keyboard.

45–60 minutes of preparation

10 min · Read source and task

Read the relevant weekly R practical and codebook through authorised UCL access. Identify source questions separately from original ferdo exercises.

5 min · Set measurable goals

Specify three actions the learner should perform independently: e.g. join two tables correctly, summarise groups, interpret one output.

15–20 min · Rehearse code

Open RStudio; check working directory, packages, data types, variable names, joins and expected results. Never treat an unrun script as runtime-verified.

10 min · Plan questions and debugging

Write two conceptual prompts, one deliberate code or data mistake and one task using new fictional data.

10 min · Prepare follow-up

Prepare a short independent task, a 10-point formative rubric and an exit ticket. Keep original student files out of the public site.

Quick readiness check

  1. What object does `x <- c(2, 4, 6)` create? What does `mean(x)` return?
  2. Why does `mean(c(2, NA, 6))` return `NA`, and what does `na.rm=TRUE` do?
  3. Before joining two datasets, which keys, labels and missing values would you inspect?
  4. Can the student independently create and explain one small R expression?

If the first two explanations are weak, teach the full Lesson 0. If they are sound, use a 15–20 minute bridge and move to Week 1. This is an instructional decision, not a diagnosis or official score.

90-minute session plan

TimePhaseEvidence
0–8DiagnosticAsk the learner to predict `mean(c(2,4,6))` and explain `NA`.
8–20ConceptState the research problem in natural language; define inputs, outputs and assumptions.
20–37Paired codingLet learner predict each line before running; explain objects and functions.
37–55Guided practiceLearner types and checks each operation, using inspection and error messages.
55–60PauseBreak.
60–77Independent transferNew tiny dataset or a variant of a Week 1–4 practical, without copying.
77–86Debug and interpretFind a missing-data or label error; state what the output cannot prove.
86–90Exit and homeworkAsk a short explanation and give one targeted task.

Open interactive classroom sequence

Week-by-week priorities

StageTeachLearner demonstrates
0 — FoundationsInput/output, objects, vectors, mean, missingness; use synthetic before/after scoresExplain why a mean is NA; identify four valid matched changes.
W1 — FamiliarisationAssignment, functions, indexing, data.frame and inspectionWrite and explain an original short R script.
W2 — Data WranglingRead CSV; inner_join, filter, mutate, group_by, summariseAudit join keys and labels; prefer codebook over conflicting notes.
W3 — SummarisingPivot data, score AQ-10 screening items, calculate mean and SDExplain why screening scores do not establish a clinical diagnosis.
W4 — Plotsggplot2 mapping, geoms, scatter, histogram, violin, boxplotsDistinguish median/IQR from mean±SD and confidence intervals.

Important data-label warnings

In the student-source codebook, occasion=0 pretest, 1 posttest, 2 follow-up, and sex=1 female, 2 male; some instructional hints reverse labels. Do not silently change the dictionary: inspect actual codebook and explain conflicting documentation. AQ-10 is screening, not diagnosis; boxplots show median/quartiles by default, not mean±SD.

Formative rubric — out of 10

CriterionPointsObservable evidence
Problem specification2Defines inputs, output, assumptions, operations
Independent implementation3Writes the required R expression with appropriate data
Debugging and data audit2Checks missingness, labels and failures
Interpretation2Explains the statistic and avoids unsupported conclusions
Reproducibility1Provides a script that runs from a clean setup

0–4: focused scaffolding; 5–7: targeted repetition; 8–10: move to transfer. These are suggestions for instructional tracking, not UCL grading bands.

Sample 60-minute mock assessment

PartMinutesTask
A10Predict, run and explain a short R snippet, including NA.
B20Transform and summarise a small new synthetic CSV.
C15Find a bad join, incorrect label or missing-data rule.
D15Make an appropriate plot; report the result and one limitation.

The real UCL exam structure has not been established. Do not advertise this practice as an official or equivalent paper.

After each lesson

Save a short record in your own authorised system; do not publish a real student's performance publicly. Blank template below.

Date / session / source week:
Three measurable goals:
What the learner completed independently:
Bug, data issue or interpretative issue:
Hint level used:
Formative rubric /10:
Student explanation (private record):
Next action and homework:

Download blank template

Continue

Public instructor desk · Lesson 0 worked solutions · R syntax guide · PALS Week 1–4 map