D-Lab's 4 part, 8 hour introduction to R Fundamentals. Learn how to create variables and functions, manipulate data frames, make visualizations, use control flow structures, and more, using R in RStudio.
Notes from Mingyu after teaching R Fundamentals:
In Part 4, we feel it makes more sense to introduce R functions first, and then move forward to ggplot. Start with an even simpler function, perhaps referring to the functions that have been introduced to participants in previous sessions. The syntax/grammar of ggplot may look intimidating to folks; leave it to the end and link it to the R data viz workshop.
Suggestions from discussion with Mingyu and Hero
Move custom functions section to first half of Part 4
Need to change motivating example from ggplot example to one about workflow (eg. say you want to print out the mean and percent missing for different variables. You write out the same line of code 6 times but you make a typo with one of them --> this is a good time to make a function that takes variable name as input and prints out the mean and percent missing as output)
Move ggplot to after custom functions
Final demo shows ggplot inside a function --> motivates going to R Data Wrangling and R Data Vis
Notes from Mingyu after teaching R Fundamentals: In Part 4, we feel it makes more sense to introduce R functions first, and then move forward to ggplot. Start with an even simpler function, perhaps referring to the functions that have been introduced to participants in previous sessions. The syntax/grammar of ggplot may look intimidating to folks; leave it to the end and link it to the R data viz workshop.
Suggestions from discussion with Mingyu and Hero