Programming Assignment2 for R on Coursera