View source: R/train-test-split.R
| train_test_split | R Documentation | 
This function splits data into a training and testing set. You can choose the test size. It returns a list with the training data and test data as separate objects.
train_test_split(data, test_size = 0.2)
| data | a data.frame or matrix where rows equal observations. Location of xs and ys does not matter. | 
| test_size | a real value in (0,1). Default is 0.2. If less than 0 or greater than 1 an error is returned. | 
df <- create.regr.data(100,4,ytype="continuous")$Data train_test_slit(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.