From Data to Thesis: Research Data Analysis with R
Playground, Chapter 2: Data Structures in R

How to use this project
1. Double-click chapter02.Rproj. RStudio opens with this folder as the working directory.
2. Open exercises.R. It has four parts:
   A. Practise the chapter       the book's exercises, with blanks (______) to fill
   B. Go further                 new exercises beyond the book
   C. Check your understanding   short questions to answer in your own words
   D. Do it yourself             open tasks: no starter code and no answers
   Run a line with Ctrl+Enter (Cmd+Enter on a Mac).
3. Check parts A to C in solutions.R, after you have tried each one yourself.
   Part D has no solutions: the tasks are open, as in your own thesis.

Exercise 5 and Task 4 read the SPSS file and need the haven package, and
Task 1 reads the Excel file with the readxl package (install once):
install.packages(c("haven", "readxl"))

Files
- exercises.R         the four parts, with starter code for parts A and B
- solutions.R         solutions for parts A and B, model answers for part C
- students.csv        one row per student in the wellbeing study (600 students)
- semesters.csv       one row per student per semester
- wellbeing_raw.xlsx  the messy survey export (cleaned in Chapter 3)
- wellbeing.sav       the SPSS version of the data, with labels

Please note: Elaf and her data are fictional. The data was generated by a
computer program to look realistic, and its patterns were built in by the
author. It describes no real people and is not evidence about real students;
do not cite or use it as research findings.

All four parts, except the SPSS and Excel tasks, can also be done in your
browser at:
https://polla-fattah.github.io/R4NTR/playground/chapter02.html
