Attention R beginners:
Tired of copy pasting blocks of code? Found yourself fixing the same bug in five different places? Want to test many variations of your script? Generate multiple similar plots?
Write R functions! They will make your R code more concise, easier to read, debug, and mantain.
We'll have two short sessions:
Introduction to functions
Martin Herrerias will discuss basic function syntax, arguments, and environments
Generating plots with functions
Sian Bladon will give a brief introduction to ggplot2 and talk about using the map function from purrr to automate creating multiple plots