I am trying to perform an image classification using the random forest model. The image is a Landsat 7 ETM with bands 4,3,2. I am running the code on Rstudio server. However, I get the following error.
rf <- randomForest(as.factor(class) ~ B2 + B3 + B4, data=training,
ntree=2000, na.action = na.omit)
Error: cannot allocate vector of size 25.5 Gb
What could be the problem?