modified r file
Merge https://github.com/kunanit/ProgrammingAssignment2