R ProgrammingAssignment 2