Description Usage Arguments Value Author(s) Examples
Split data into testing and training sets for cross-validation.
1 |
data.source |
Data frame or matrix of input data to be split. |
ratio |
If greater than one, number of folds to split data into.
Otherwise, proportion of rows in training data. See |
return.rows |
If |
A list containing the input data, split into testing and training
sets. If ratio
is greater than one, returns a list with ratio
entries, each with 1/ratio
of the input data in the testing set
(data.out
) and the rest in the training set (data.in
).
Otherwise, returns a list with one split of the data, with ratio
of
the input data in the testing set and the rest in the training set.
Kandel BM and Avants B
1 2 3 4 5 6 7 | ## Not run:
n <- 30
ratio <- 2/3
data.source <- data.frame(value=1:n)
out <- splitData(data.source, ratio)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.