General cross-validation in R