Programming Assignment 3 for R programming in Data Track