R code from the Coursera Data Science course