starting R code