Schedule

Workshop Schedule

Day 1

Time Topic Instructor
9:30 - 10:00 Workshop Introduction Will
10:00 - 11:15 Introduction to R and RStudio Noor
11:15 - 11:55 R Syntax and Data Structure Noor
11:55 - 12:00 Overview of self-learning materials and homework submission Will

Before the next class:

I. Please study the contents and work through all the code within the following lessons:

  1. Functions and Arguments

    Click here for a preview of this lesson


    Functions are the basic “commands” used in R to get something done. To use functions (denoted by function_name followed by “()”), one has to enter some information within the parenthesis and optionally some arguments to change the default behavior of a function.
    You can also create your own functions! When you want to perform a task or a series of tasks more than once, creating a custom function is the best way to go.

    In this lesson you will explore:
    - Using built-in functions
    - Creating your own custom functions

  1. Complete the exercises:
  • Each lesson above contains exercises; please go through each of them.
  • Copy over your solutions into the Google Form the day before the next class.

Questions?

  • If you get stuck due to an error while runnning code in the lesson, email us

Day 2

Time Topic Instructor
9:30 - 9:45 Questions about self-learning All
9:45 - 10:05 In-class exercises Noor
10:05 - 10:35 Reading in and inspecting data Will
10:35 - 11:20 Data wrangling: Subsetting vectors and factors Will
11:20 - 12:00 Data wrangling: Data frames, matrices and lists Will

Before the next class:

I. Please study the contents and work through all the code within the following lessons:

  1. Packages and libraries

    Click here for a preview of this lesson


    Base R is incredibly powerful, but it cannot do everything. R has been built to encourage community involvement in expanding functionality. Thousands of supplemental add-ons, also called “packages” have been contributed by the community. Each package comprises of several functions that enable users to perform their desired analysis.

    This lesson will cover:
    - Descriptions of package repositories
    - Installing a package
    - Loading a package
    - Accessing the documention for your installed packages and getting help

  2. The %in% operator

    Click here for a preview of this lesson


    Very often you will have to compare two vectors to figure out if, and which, values are common between them. The %in% operator can be used for this purpose.

    This lesson will cover:
    - Implementing the %in% operator to evaluate two vectors
    - Distinguishing %in% from == and other logical operators
    - Using any() and all() functions

  1. Complete the exercises:
  • Each lesson above contains exercises; please go through each of them.
  • Copy over your solutions into the Google Form the day before the next class.

Questions?

  • If you get stuck due to an error while runnning code in the lesson, email us

Day 3

Time Topic Instructor
9:30 - 10:00 Questions about self-learning lessons All
10:00 - 10:20 Setting up a data frame to plot (+ the map() function) Will
10:20 - 10:40 In-class exercises Will
10:40 - 11:20 Plotting with the ggplot2 package Noor
11:20 - 11:40 Using custom functions for consistent plots Noor
11:40 - 12:00 Writing to file and exporting plots Will

Before the next class:

I. Please study the contents and work through all the code within the following lessons:

  1. Generating a boxplot with ggplot2

    Click here for a preview of this lesson


    Previously, you created a scatterplot using ggplot2. However, ggplot2 can be used to create a very wide variety of plots. One of the other frequently used plots you can create with ggplot2 is a barplot.

    This lesson will cover:
    - Creating and customizing a barplot using ggplot2

  2. Finding help

    Click here for a preview of this lesson


    Hopefully, this course has given you the basic tools you need to be successful when using R. However, it would be impossible to cover every aspect of R and you will need to be able to troubleshoot future issues as they arise.

    This lesson will cover:
    - Suggestions for how to best ask for help
    - Where to look for help

  3. Tidyverse

    Click here for a preview of this lesson


    The Tidyverse suite of integrated packages are designed to work together to make common data science operations more user friendly. Tidyverse is becoming increasingly prevalent and it is necessary that R users are conversant in the basics of Tidyverse. We have already used two Tidyverse packages in this workshop (ggplot2 and purrr) and in this lesson we will learn some key features from a few additional packages that make up Tidyverse.

    This lesson will cover:
    - Usage of pipes for connecting together multiple commands
    - Tibbles for two-dimensional data storage
    - Data wrangling within Tidyverse

  1. Complete the exercises:
  • Each lesson above contains exercises; please go through each of them.
  • Copy over your solutions into the Google Form the day before the next class.

Questions?

  • If you get stuck due to an error while running code in the lesson, email us

Day 4

Time Topic Instructor
9:30 - 10:10 Questions about self-learning lessons All
10:10 - 10:45 In-class exercises Noor
10:45 - 11:15 Loops Will
11:15 - 11:45 Merging tables Will
11:45 - 12:00 Wrap Up Will

Final Exercises

Building on the basic R knowledge

Resources

Cheatsheets