Description Usage Arguments Value
Split data into training and test sets
1 | train_test_split(d, holdout, groups = NULL)
|
d |
data frame |
holdout |
quoted name of column that defines train/test splits. |
groups |
quoted name of column(s) to group training data by. optional, will be preserved in output (and added as grouping to training data). |
data frame with columns 'data_train', 'data_test', one for each level of holdout and group (if specified), which are also included. 'data_test' has the corresponding subset of the input data, and 'data_train' has the rest.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.