for the coursera R programming assignment