added cross validation sample R code