R Training for Students at the Center for Cognitive and Decision Sciences (CDS)

Although you might be intimidated by starting with R, this website is here to help you get established in R so that you will be equipped with the basics of this program! This website was created by the CDS to support students.

Last updated: Wed Nov 23 1:52:26 PM 2022

An overview of the R Training Program timeline - see specific topics below

Please note that this site is work-in-progress.

Semester 1: Basic R Skills

Semester 2: Intermediate R Skills

Tips to getting started

Learning R can be challenging, but ultimately rewarding! Below are some of tips to get you through the learning process easier.

Setting up RStudio Check out this PDF from Edi Most, which describes some useful tips to setting up RStudio.

Use the help function The help function in R can help you understand how the function works or what it is doing. You can go to the ‘help’ tab in the viewer pane and type the name of the function its search tab. Note: only functions in the currently loaded packages will show up, so make sure you have the package with the function of interest loaded with the command library(packagename). You can also type ?functionname into the console (e.g. ?mean). Every function has documentation, and this command will bring it up. If you don’t know the exact function name, you can also type ??thingIamlooking (e.g. ??mean) to perform a search for related documentation. See this page for how to get help in R.

Search in forums There are many forums such as stackoverflow.com or stackexchange.com where many people ask questions on R. It is most likely that someone has already asked a question that you have on one of these forums and have provided detailed answers.

Discuss with other students There are many different ways of solving a problem in R. Chances are that a new, easier solution that you have not thought about emerges from discussing with others. Connect with your fellow students and don’t hesitate to work in groups as well as asking those in higher semesters for help!

The internet is full of resources for learning R. Below are few of the most helpful links to support you with your learning.

R for Data Science This online book has great explanations and codes to many of the topics that you will be going through in the R training. It offers in-depth explanations to R as well as to individual functions.

YaRrr! The Pirate’s Guide to R This is another great online book to get you started in R. This book also contains great explanations to R as well as guides to conducting different hypothesis tests such as t-tests, ANOVA and regressions.

Introduction to Tidyverse Tidyverse is a set of R packages that share a common ‘style’. Tidyverse is a neat, clean and easy style of using R that will help you write even more beautiful code in R. This is also the coding style that we will be using again and again in this training program. Check out Brian Ward’s practical introduction to the most essential functions of Tidyverse.

The Tidyverse Style Guide Good coding style is what marks a good coder! This site describes the tidyverse style, which is used throughout this course. Check out this style guide to make your code more elegant.

Datacamp Datacamp is an online learning platform for Data Science. They offer many hands-on lessons and tutorials in R. If you need a little refresher in R, we recommend that you go through the free course Introduction to R in Datacamp.

RStudio Cheatsheets It would be impossible to learn all the different functions in R by heart, and nobody expects you to have these all in memory. ☺️ Cheatsheets are a great way to have an overview of the most basic functions and will make your life (with R) much easier.