I'm trying to take a dataset and partition it into 3 pieces: training: 60%, testing: 20%, and validation: 20%.
part1 <- createDataPartition(fullDataSet$classe, p=0.8, list=FALSE)
validation <- fullDataSet[-part1,]
workingSet <- fullDataSet[part1,]
When I do the same thing to partition again:
inTrain <- createDataPartition(workingSet$classe, p=.75, list=FALSE)
I get the error:
Error in sort.list(y) : 'x' must be atomic for 'sort.list'
Have you called 'sort' on a list?
Is there a way to either a) create 3 partitions of different sizes or b) do a nested partition like what I tried to do? I've considered c) use sample() instead, but it's for a class in which the instructor only uses createDataPartition, and we have to show our code. Does anyone have any advice here?