coursera R programming course assignment 2