Updates for assignment 2 in R Programming