Last Version of the Programming Assignment 2 in R