assignment 3 of coursera on R