the R code