Completed R code and plots for Course Project