Last updated: Thu Oct 17 16:41:22 2024
This module is designed to teach students the basic skills needed to conduct quantitative research in R. This module covers basic data skills, data tidying, plotting data, and analysing datasets in R. This is not meant to be a comprehensive guide to R (such a thing would be almost impossible!). Rather, this module is designed to be a gentle introduction to R, cover statistical techniques that are common in psychological research, and provide a solid base where you can investigate advanced techniques on your own. This website contains material covered in the demonstrations of the module. Weekly exercises are also provided that are designed for you to practice your R skills, and introduce new concepts for students looking for an additional challenge.
Each week, we will be tackling the following topics:
Exercises are available each week and are designed to reinforce content. These exercises are split into basic and advance sections. It is expected that students can complete the basic sections of each weekly exercise, with the advanced sections designed for students who want an extra challenge or learn additional functions in R. If you can successfully complete these exercises, then you should be able to easily complete the marked assessments.
Within these workbooks, we will be analysing real data collected in a survey at the beginning of semester. Before beginning the first workbook, it is a good idea to complete this survey yourself, as 1) it will give you an idea on how the data we are analysing was collected, and 2) if no one does the survey, then we won’t have any data to analyse!
R is a free software environment for statistical computing and graphics. If you already have R installed on your computer, make sure you have the latest version. Otherwise, you can follow the instructions below to install R. R can be installed on most computers and laptops, but cannot be installed on tablets and some chromebooks.
Note: Throughout the process of installing R and RStudio, do not change directories or roots. Always select the default options. Changing options can break links and cause many headaches down the line.
Windows users will also need to download an additional extension called Rtools.
Also note, for Windows users, sometimes after going through the RStudio install process, RStudio may be installed properly on your computer but did not create an icon on the desktop. You may need to search for RStudio in the menu (the button in the bottom left corner) to find it.
RStudio provides a graphical user interface for R. It is designed to make R easier to use. All content from this module will be conducted in RStudio.
Note: Downloading both R and RStudio will usually results two different icons that can be opened to start R. For all material in this course, make sure to open RStudio, and not R.
Many online tutorials are available for learning R that can be used to compliment the materials here. If you are feeling overwhelmed, or just looking for additional content, try some of the following courses:
Note: Often there are more than one way to do things in R. During this module, I will primarily be teaching R using the tidyverse packages, but you may find other ways to achieve the same objective. In all cases, you should go with the method that makes the most sense to you.