Part1 of programming assignment in R