Splits a dataset into training set and test set
This function splits a dataset into training set and test set. Return an object of class dataset-class
.
splitdata(dataset, target, size = round(0.7 * nrow(dataset)), seed = NULL)
dataset |
The dataset to be split ( |
target |
The column index of the target variable (class label or response variable). |
size |
The size of the training set (as an integer value). |
seed |
A specified seed for random number generation. |
An object of class dataset-class
.
require (datasets) data (iris) d = splitdata (iris, 5) str (d)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.