R scripts for a coursera course