Implementation of the Programming Assignment 2 of R Programming.