This is for R programming assignment 2