R Intro (Fall 2023)
R is an open-source programming language for statistical computing and graphics. R is extensible, and has a large collection of high-quality user contributed packages that provides easy tools for common data analysis tasks. This 4-session workshop will introduce you the fundamentals of R programming.
What To Prepare
Please install R and RStudio Desktop before the first session.
If you encounter technical difficulties installing the software, you can instead create a free RStudio Cloud account so you can run R in the cloud via your browser.
An alternative to RStudio Cloud is the UofT JupyterHub/RStudio system. Go to its home page, choose the RStudio option, and click Log in to start. You will need your UTORid to login.
Session 1, 2
- Slides
- Code
- Weighted dice (We will code this one together; play_ground.R & dice.R)
- R basic data structures (R Notebook )
- R basic programming structures (R Notebook )
- Reading list
- Your Textbook (Section 2.3 Lab: Introduction to R)
- Hands-on Programming with R (Chapter 1 to 3; Chapter 4 to 7, 9 and 11)
Session 3, 4
- Slides
- Code
- Reading list
- Your Textbook (Section 3.6 Lab: Linear Regression)
- R for Data Science (Chapter 5, 9 to 11, and 18)
Resources
- From Zero to Hero
- Step 1: Hands-on Programming with R (beginner level; learn R programming basics.)
- Step 2: R for Data Science (intermediate level; learn to manipulate, analyze and visualize data using R’s Tidyverse packages.)
- Step 3: Advanced R (advanced level; learn to master R.)
- Other Resources
- R for Reproducible Scientific Analysis (from software carpentry)
- Programming with R (from software carpentry)
- R Graphics Cookbook
- ggplot2: Elegant Graphics for Data Analysis
- The R Graph Gallery (R graph samples with code)
- R Cheat Sheets (cheat sheets for many popular R packages)
- DoSStoolkit (self-paced interactive modules to help you learn and use R from Uoft Dept. of Statistical Science)
Back to TDMDAL Computing Page