Added homework 2,3 R code