ProgrammingAssignment2

I edited the R file to complete my assignment.