My updated solution to the ProgrammingAssignment2 - R Programming (Coursera)