R file used to generate slides