Coursera R Language ProgrammingAssignment3