Coursera "R programming" course assignment 2