createListPartition: createListPartition

View source: R/createDataPartition.R

createListPartitionR Documentation

createListPartition

Description

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!

Usage

createListPartition(l, cross_validation_val, test_size = 0.2)

Arguments

l

list of data

cross_validation_val

number of sets for k-fold cross validation

test_size

size of test set (default=.8)

Value

partitioned list

Examples

{
# Example with the preloaded mtcars dataset
l<-list("A", "B", "C", "D", "E", "F", "G", "H", "I", "J")
partition <- SVHM:::createListPartition(l, 3, .1)
}


herglola/SVHM documentation built on March 24, 2022, 12:44 p.m.