Playground
Practise every chapter on the student wellbeing data
The playground is where you practise. Every chapter of the book has a playground page, and every page works through the chapter in four parts. Practise the chapter repeats the book’s exercises, with starter code, hints, and solutions. Go further goes beyond the book, with new questions, simulations, and some of R’s built-in datasets. Check your understanding asks short questions whose model answers open with a click. Do it yourself ends each page with open tasks and no answers: an empty space for your own code, as in your own thesis.
You can do the exercises in two ways. In your browser, you type and run R code on the page itself, without installing anything. On your own computer, you download the chapter’s project and open it in RStudio: it contains the data and all four parts as an R script, with the solutions in a separate file. A few packages used in the later chapters, such as tidymodels, mclust, and fable, are too large for a browser. On those pages, the browser exercises teach the same ideas with functions that come with R, and the download project uses the chapter’s own packages.
Try each exercise yourself before you open the hint or the solution. Making mistakes and fixing them is how everyone learns R.
Please note: the case study and its 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.