the assignment 2 for R Programming of Coursera