Description Usage Arguments Value
The input data is assumed to have repeated observations per subjects, the folds are defined as clustered by subject IDs.
1 | add_CVfolds_ind(data, ID, nfolds = 5, fold_column = "fold", seed = NULL)
|
data |
Input dataset, can be a |
ID |
A character string name of the column that contains the unique subject identifiers. |
nfolds |
Number of unique folds (same fold is always assigned to all observations that share the same ID). |
fold_column |
A name of the column that will contain the fold indicators |
seed |
Random number seed for selecting a random fold. |
An input data with added fold indicator column (as ordered factor with levels 1:nfolds).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.