This will sample the training and test sets so that case identifiers (e.g. subject ID's) are not shared across training and test sets.
resample_fold_train_test_split(X, y, train_size = 0.667, foldid = NULL,
random_state = NULL)A data.frame, the data to be resampled.
A numeric vector with two classes, 0 and 1.
A numeric vector of length one; specifies what proportion of the data should be used for the training data set. Defaults to 0.667.
A vector with length equal to length(y) which identifies cases belonging to the same fold.
An integer vector of length one; specifies the seed to be used for the analysis. Defaults to NULL.
A boolean vector of length n_obs where TRUE represents that observation should be in the train set.
Other resample: resample_simple_train_test_split,
resample_stratified_class_train_test_split,
resample_stratified_simple_train_test_split