OIT/SMU Libraries Data Science Workshop Series - Introduction to R Programming
All course material is provided under
Information
This workshop provides you with the foundation to enter the exciting field of data science by learning the basics of the R programming language. R will enable you to replace repetitive tasks or manual work (e.g., in Excel) with repeatable R scripts and give you a tool to start exploring how data science and machine learning with R can be used in your area. The course covers R Studio, programming basics and the R syntax, functions, vectorization, importing and exporting data (CSV, Excel), cleaning data, basic visualization and working with packages for data science.
- Instructor: Michael Hahsler
- Times and Location: Register
Session 1: Introduction
- Learning Goals
- What is R?
- RStudio and a first R session
- R Basics including vectors and subsetting
- Slides: 1. Introduction
- Needed Software
- Learning Material
- Reading for this session: An Introduction to R (Chapters 1 and 2)
- R Manuals, Packages and Task Views (to find packages) can be found on The Comprehensive R Archive Network (CRAN).
- Finding solutions: Google or go to stackoverflow.com and use the tag “[R]” in your search.
- Cheat sheets: Base R, RStudio IDE (cheat sheet from RStudio Cheat Sheets)
Session 2: Programming Basics
- Learning Goals
- Objects in R
- Importing and exporting data
- Functions, loops, and apply
- Slides
- Learning Material
- Reading for this session: An Introduction to R (Chapters 3-7 and 9-10)
- Data: MLB_cleaned.xlsx, MLB_cleaned.csv
Session 3: Exploring Data and Reporting
- Learning Goals
- Basic plots in R
- Creating reports
- Slides
- Exercises
- Create a report for the MLB data with RMarkdown. Here is an example: MLB.html (Markdown file: MLB.Rmd)
- Creating a dashboard for the MLB data with flexdashboard. Here is an example: MLB_dashboard.html (Markdown file: MLB_dashboard.Rmd)
- Learning Material
- Reading for this session: An Introduction to R (Chapter 12)
- Cheat Sheet: RMarkdown
- Useful packages for creating interactive reports: DT, plotly, and shiny.
- Linked-in Learning Video Course: Building Data Apps with R and Shiny (advanced self-study material)
Session 3a (optional): Handling Data With tidyverse
- Learning Goals: Understand how to handling data with tidyverse.
- An Extremely Short Introduction to Tidyverse
- Learning Material:
- Free textbook: R for Data Science by Grolemund and Wickham.
- Cheat Sheets: RStudio Cheat Sheets
Session 3b (optional): Visualizing Data With ggplot2
- Learning Goals: Understand how ggplot2 graphs are created.
- An Extremely Short Introduction to ggplot
- Learning Material:
- Free textbook: Data Visualization: A practical introduction by Kieran Healy.
- Cheat Sheets: Data visualization with ggplot2
- Linked-in Learning Video Course: ggplot 2 in R (advanced self-study material)
Session 4: R for Data Science
- Learning Goals: Predictive modeling.
Material and other suggested training resources:
- Text: An Introduction to R
- Related Linked-in Learning Video: Learning R
- Related Linked-in Learning Path: Master R for Data Science