Completing ProgrammingAssignment 2 for R Programming