Assignment2 of Coursera R-Programming