R code for submission