Coursera R course programming assigngment 2,