R file for the coursera project
Merge https://github.com/rafaelcb/ProgrammingAssignment2