R Crash Course

Introduction to R for non-programmers using gapminder data.

The goal of this lesson is to teach novice programmers to write modular code and introduce to you best practices for using R for data analysis. R is commonly used in many scientific disciplines for statistical analysis and its array of third-party packages. We find that many scientists use R and want to learn more. The emphasis of these materials is to give attendees a strong foundation in the fundamentals of R, and to teach best practices for scientific computing: breaking down analyses into modular units, task automation, and encapsulation.

Note that this workshop will focus on teaching the fundamentals of the programming language R, and will not teach statistical analysis.

A variety of third party packages are used throughout this workshop. These are not necessarily the best, nor are they comprehensive, but they are packages we find useful, and have been chosen primarily for their usability.

Prerequisites

Understand that computers store data and instructions (programs, scripts etc.) in files. Files are organised in directories (folders). Know how to access files not in the working directory by specifying the path.

Schedule

Setup Download files required for the lesson
00:00 1. Introduction to R and RStudio How to find your way around RStudio?
How to interact with R?
How to manage your environment?
How to install packages?
02:15 2. Project Management With RStudio How can I manage my projects in R?
03:00 3. Seeking Help How can I get help in R?
03:50 4. Data Structures How can I read data in R?
What are the basic data types in R?
How do I represent categorical information in R?
06:30 5. Exploring Data Frames How can I manipulate a data frame?
07:30 6. Subsetting Data How can I work with subsets of data in R?
08:45 7. Control Flow How can I make data-dependent choices in R?
How can I repeat operations in R?
11:00 8. Creating Publication-Quality Graphics How can I create publication-quality graphics in R?
13:00 9. Vectorization How can I operate on all the elements of a vector at once?
14:00 10. Functions Explained How can I write a new function in R?
16:00 11. Writing Data How can I save plots and data created in R?
17:30 12. Split-Apply-Combine How can I do different calculations on different sets of data?
19:30 13. Dataframe Manipulation with dplyr How can I manipulate dataframes without repeating myself?
22:30 14. Dataframe Manipulation with tidyr How can I change the format of dataframes?
23:45 15. Producing Reports With knitr How can I integrate software and reports?
26:00 16. Making use of Bioconductor How can I use Bioconductor packages in my project?
31:00 17. Writing Good Software How can I write software that other people can use?
31:10 18. Train your skills How to practice?
32:11 Finish

The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.