Programming Assignment 2 for for R Programming