Solution for the Programming Assignment 2 of the R_Programming Coursera online course.
Adding comments to the code