added R code file for third week's homework