train_test_split | R Documentation |
This function splits the data into training and testing sets.
train_test_split(x, y, validation_split)
x |
(data frame): A data frame of predictors. |
y |
(list/vector): A list or vector of responses. |
validation_split |
(numeric): A number between 0 and 1 that represents the proportion of the data to be used for testing. |
out (list): A list containing all of the below components...
$train_x (data frame): A data frame of predictors for the training set.
$train_y (list/vector): A list or vector of responses for the training set.
$test_x (data frame): A data frame of predictors for the testing set.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.