SYNTHETIC DATA · BASE R

R practice and data centre

One fictional dataset plus fourteen downloadable practice scripts.

Practice calculation without confusing computation and inference. The conceptual lessons can be completed without writing code.

Download the 36-row CSV

Math pathway and R scripts

Eight base R verification scripts and worked examples.

Open math pathway →

Data dictionary

FieldMeaningCaution
idFictional person identifierDo not average identifiers
groupA, B, C observational labelsNot randomised treatments
study_hoursReported study hoursSelf-report bias is plausible
score_preScore beforePaired with score_post by id
score_postScore afterNot evidence of causal treatment
preferenceVisual or Text categoryCategorical outcome
stress_ratingOrdinal 1–5 stress scoreThree entries missing

How to run the labs

  1. Download the CSV and the desired .R script into the same local folder.
  2. Open RStudio; set the working directory to that folder or use an RStudio Project.
  3. Open the downloaded script and choose Source, or run it line by line.
  4. Read every printed result together with the assumptions and the task prompt.
  5. Keep your interpretation separate from the code output.

No extra R packages, no private data, and no external APIs are needed. Runtime execution has not been verified in the user's RStudio; this guide does not claim such a test.

All downloadable labs

R Lab companion

If RStudio is new to you, use the existing R Lab lessons 1–6 for code, files, data frames, graphics and debugging.

R Lab →