Add R code to produce plot