Description Usage Arguments Value Examples
This function will split a dataset into training and test groups. Group membership is defined by a "train.set" index list.
1 | split_data(data, split.pct)
|
data |
Dataset for splitting, data frame. |
split.pct |
The percentage of data to be used in training set, numeric between 0-1. |
train.set An index of records used in training, numeric list. Remove these indices for test set.
1 2 3 | train.index <- split_data(iris.data, 0.7)
training.data <- iris.data[train.index, ]
test.data <- iris.data[-train.index, ]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.