I a facing a problem while impementing a randomForest model in R.
I am getting an error saying->
Error in randomForest.default(m, y, …) : Can’t have empty classes in y.
randomforest was running fine before I added this to my code
Why is this error coming after using this code? What has changed in my train dataset after creating a new variable like this? How to get rid of it?