Set of simple but effective R functions for cross-validation