This is an introductory R course intended for learners with no prior coding experience. It was initially put together the goal of helping introduce wet-lab researchers affected by university shutdowns during the spring of 2020 to learn the basics of programming in R, and borrows heavily from a class taught to NYU summer research students.
Table of Contents
-
Intro R Course, Workshop 1: Introduction
- downloading and installing R and Rstudio
- learning your way around Rstudio
- packages
- simple math in R
-
Intro R Course, Workshop 2: Variables, Types, and Functions
- variables
- types
- basic functions
-
Intro R Course, Workshop 3: Vectors
- creating vectors (lists of things)
- consecutive sequences of numbers
- math with vectors
- pulling specific elements out of vectors
- vector types
-
Intro R Course, Workshop 4: Missing values and Logical operations
- creating, storing, and working with missing values
- logical (boolean) types
- using logical types to select data of interest
- operations with logical data types
-
Intro R Course, Workshop 5: Dataframes
- formatting data for analysis and reading excel data into R dataframes
- selecting rows and columns of interest
- adding columns to dataframes
- exporting data from R
- performing operations on individual columns of data
-
Intro R Course, Workshop 6: Plotting (with ggplot2)
- plotting with base R
- introduction to ggplot
- combining multiple data representations in ggplot
- changing the appearance of plots
- organizing data according to “tidy” principles
- easy, reproducible paper figures with ggplot
-
Intro R Course, Workshop 7: Summarizing data and doing basic stats
- subsetting data
- summarizing your data
- splitting data by categories to calculate stats
- ttests, anova, linear models
- resources for learning to do statistics in R
-
Intro R Course, Workshop 8: Basics of programming, and simulation in biology (Part I)
- conditional statements
- simulating biological data (intro)
- random number generation
- writing your own functions
-
Intro R Course, Workshop 9: Basics of programming, and simulation in biology (Part II)
- simulating biological data (continued)
- testing functions
- loops
- using simulations to plan experiments
- additional resources