Added R code and saved plots