added R code file for second week's homework