researching on cross validation in R