The R code from Prof. Daniel R. Little (Workshop 2)