I am running following code:
TrainSet$volume <- factor(TrainSet$volume)
model1 <- randomForest(volume ~ ., data = TrainSet, importance = TRUE)
It gave me the following error:
NAs introduced by coercion
NAs produced by integer overflow
Error in integer(nclass * nsample) : vector size cannot be NA
I have checked
length(TrainSet$volume)
which gave me
[1] 126671
So any ideas why I get that error?