R code to try