my R code and plots