final R code