R code sample