coursera R programming assignment2