View source: R/train_test_split.R
1 | train_test_split(df, train_size = 0.7, shuffle = TRUE)
|
df |
dataframe to split. |
train_size |
split percent. Is percent of rows into train set after split the input dataframe. Speficy it as a percent between 0 and 1. i.e. .7 is 70 \itemshuffleApplies a random order befoe split the dataframe. TRUE by default. |
Makes a train test split. It Also makes a suffle by default.
train_set, test_set %<-% train_test_split(df, .7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.