R code for class and work projects