R scripts for Course Project 1