Home

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

Group Work

You are expected to work through the lab tasks in groups of up to 6 students. You can either:

  • Option 1: work independently on your own device and discuss lab exercises with your fellow group members.

  • Option 2: follow a similar structure as you did in DAPR1 where in each group, one person is the driver and the rest are navigators (each week the driver must rotate so that everyone experiences being a driver at least once). Please note that as you will be using a local version of R and RStudio, you will need to share the file with your group members each week. If you select this option, the roles are defined as follows - drivers are responsible for typing the code and written solutions for their designated week, and sharing the resulting RMarkdown file with the group via the Learn group discussion space or via email; and navigators are responsible for suggesting and commenting on the code, spotting typos, fixing errors, and generating the text-based solutions.

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.

This is an example of a hint. They will usually link you to the course flashcards page that we will build on as we progress throughout the course.

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.

Flashcards

The purpose of the flashcards is to complement your core learning materials i.e., your lecture and lab materials, by offering additional guidance and examples on key concepts/topics. They are designed to deepen your understanding, clarify complex concepts, and help you make connections between different areas of study. Think of it as an extra resource that supports what you’re learning in the classroom.

You may want to consider using these as a supporting document whilst your work through lab exercises, and/or refer to in order to aid revision.

Solutions

Solutions are made available each Friday (usually around 12 noon). To view solutions, click the drop down ‘Solution’ button within the lab sheet.

Important
Before checking the solution you should review the lecture slides and lab hints. You should also avoid copying and pasting code from previous solutions.

Instead, you should:

  1. Try to figure out the answer yourself in collaboration with your peers (and/or ask for help from a staff member if needed).
  2. Type the code out yourself if adapting from previous exercises (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.

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.