Link Search Menu Expand Document

Introduction to R Part 2

This 2-part introductory workshop aims to teach basic concepts, skills, and tools for working with data in R so that you can get more done in less time, and apply concepts of reproducibility to your research. This is an introduction to R designed for participants with no programming experience. Part 1 of the workshop covers basic information about R syntax and the RStudio interface, including installing packages and working with vectors. Part 2 will cover importing CSV files, working with dataframes, how to deal with factors, how to add/remove rows and columns using the popular dplyr package, and how to calculate summary statistics from a data frame. Taking Part 1 and Part 2 is encouraged, but optional.

Learners should bring a laptop and should already have installed R and RStudio on their computer. Installation and set-up instructions, as well as a detailed curriculum for the workshop can be downloaded here.

After this workshop, you’ll be able to:

  • Install packages and load libraries in R.
  • Import a dataset and use tidyverse functions to explore dataset attributes.
  • Create subsets of dataframes.
  • Work with categorical variables in R.
  • Use the dplyr package to select columns and filter rows.
  • Use the dplyr package to perform various operations on a dataframe such as creating new variables, splitting and combining data, and summarizing data.
  • Use pipes in R to string together a series of steps.
  • Export a data set from R Studio.

Slides

Here are the slides for both part 1 and part 2.

Let’s get started!


Table of contents