R code and png plots