plots and R code