Adding R code