Home

Welcome to the Data Analysis for Psychology in R 2 (DAPR2) lab workbook. Using the menu above, you can find lab materials for each week.

Help, Support & Feedback

Within Lab Workbook

Hints, Notes, and Example Write-Up / Interpretation

Hints are shown in a green box, with the title ‘Hint’. If you are unsure what to do, check the collapsible hint provided (note that these are only present for some questions).

This is an example of a hint.

Notes are displayed in blue boxes, with the title ‘Note’. These are occasionally used to draw your attention to a specific point.

Note

This is an example of a note.

Example write-ups and/or interpretations are shown with a red right border. These are helpful to check your interpretation against, and a useful guide to use in future when interpreting and/or writing up results.

This is an example write-up / interpretation block.

Solutions

Solutions are made available immediately below each exercise. To view solutions, click the drop down ‘Solution’ button.

Important
Before checking the solution you should attempt the question. You should also avoid copying and pasting code from the solutions. If you do check solutions right away and simply copy the answer, you will struggle to learn from the exercises.

Instead, you should:

  1. Try to figure out the answer yourself or with your peers (and/or ask for help from a staff member if needed)
  2. Type the code out yourself (and annotate your R code chunks so you know what your code is doing & why - future you will thank you for this).

Asking Questions

  • During labs, if you have a question, please ask one of the tutors for support.
  • Outside of labs, we encourage you to use the various support options, details of which can be found on the Course Learn Page.

Tips on Googling Statistics and R

Searching online for help with statistics and R can be both a help and a hindrance. If you have an error message in R, copy the error message into Google. The results returned can sometimes just cause more confusion, but sometimes something might jump out at you and help you solve the problem. The same applies with searching the internet for help with statistics - search for “what is a p-value”, and you’ll find many many different articles and forum discussions etc. Some of them you will find too technical, but don’t be scared - the vast majority of people work in statistics will find these too technical too. Some of them you might feel are too simple/not helpful. As a general guide, keep clicking around the search responses, and you may end up finding that someone, somewhere, has provided an explanation at the right level. If you find something during your search which you don’t quite understand, feel free to link it in a post on the discussion forum!

Feedback on Labs

If you wish to make suggestions for improvements to these workbooks (or if you spot any typos!), please email ppls.psych.stats@ed.ac.uk making sure to include the course name in the subject.