View source: R/createDataPartition.R
createListPartition | R Documentation |
partitions a List into a test set and cross validation sets. createDataPartition() is not randomized, therefore the list should be randomized before creating the partition!
createListPartition(l, cross_validation_val, test_size = 0.2)
l |
list of data |
cross_validation_val |
number of sets for k-fold cross validation |
test_size |
size of test set (default=.8) |
partitioned list
{ # Example with the preloaded mtcars dataset l<-list("A", "B", "C", "D", "E", "F", "G", "H", "I", "J") partition <- SVHM:::createListPartition(l, 3, .1) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.