| Audience | Computational Skills | Prerequisites | Duration |
|---|---|---|---|
| Biologists | Beginner/Intermediate | None | 2-day workshop (~13 hours of trainer-led time) |
This repository has teaching materials for a 2-day, hands-on Introduction to R workshop. The workshop will introduce participants to the basics of R and RStudio. R is a simple programming environment that enables the effective handling of data, while providing excellent graphical support. RStudio is a tool that provides a user-friendly environment for working with R.
These materials are intended to provide both basic R programming knowledge and its application for increasing efficiency for data analysis.
- R syntax: Understanding the different 'parts of speech' in R; introducing variables and functions, demonstrating how functions work, and modifying arguments for specific use cases.
- Data structures in R: Getting a handle on the classes of data structures and the types of data used by R.
- Data inspection and wrangling: Reading in data from files. Using indices and various functions to subset, merge, and create datasets.
- Visualizing data: Visualizing data using plotting functions in base R as well as from external packages such as ggplot2.
- Exporting data and graphics: Generating new data tables and plots for use outside of the R environment.
These materials are developed for a trainer-led workshop, but also amenable to self-guided learning.
| Lessons | Estimated Duration |
|---|---|
| Introduction to R and RStudio | 40 min |
| Syntax and data structures | 80 min |
| Functions, arguments, packages and seeking help in R | 50 min |
| Data wrangling: subsetting vectors and factors | 65 min |
| Data wrangling: subsetting data frames, matrices and lists) | 75 min |
| Matching and reordering | 90 min |
| Data visualization with ggplot2 | 60 min |
| Lessons | Estimated Duration |
|---|---|
| Nested functions | 30 min |
| Basic plotting | 20 min |
The data used in this workshop can be found here.
These materials have been developed by members of the teaching team at the Harvard Chan Bioinformatics Core (HBC). These are open access materials distributed under the terms of the Creative Commons Attribution license (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
- Some materials used in these lessons were derived from work that is Copyright © Data Carpentry (http://datacarpentry.org/). All Data Carpentry instructional material is made available under the Creative Commons Attribution license (CC BY 4.0).