Re-updated R script for Programming Assignment 2 in R.