View source: R/31_pre_processing_functions.R
check_data_for_folds | R Documentation |
Validates that the input data has at least as many rows as the number of desired folds.
check_data_for_folds(data, n_folds)
data |
A data frame or matrix. |
n_folds |
Integer. The number of folds to check for. |
NULL (called for its side effect). Throws an error if the number of rows is too small.
check_data_for_folds(matrix(1:20, nrow = 5), n_folds = 5)
## Not run:
check_data_for_folds(matrix(1:4, nrow = 2), n_folds = 5) # This will throw an error
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.