coursera R Programming task2