ProgrammingAssignment2 from R programming, coursera