Programming assignment 2 for course R Programming by R. Peng in Coursera