title: Random forest package in R shows error during prediction() if there are new factor levels present in test data. Is there any way to avoid this error?
body: <p>I have 30 factor levels of a predictor in my training data. I again have 30 factor levels of the same predictor in my test data but some levels are different. And randomForest does not predict unless the levels are same exactly. It shows error. Says,
      Error in predict.randomForest(model,test)
      New factor levels not present in the training data </p>