Description Usage Arguments Value Author(s)
This will randomly split a data frame into training and test sets. I borrowed it from
http://gettinggeneticsdone.blogspot.com/2011/02/split-data-frame-into-testing-and.html
The caret packages has a similar facility using its createDataPartition() function.
Perhaps even more appealing, there is sample.split() in caTools.
1 |
dataframe |
this is the data frame you want to split |
weight |
the weights for the different classes |
seed |
an optional seed |
A list with two members; the training set and the test set
Jesse C. Ross
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.