added hw1 R code