I know this was asked a long time ago but changing the type of your column 2 (classes) into factors should fix that specific error with not recognizing classes.