I am new to R and I am trying to grow a Decision Tree:
Here is some of my data set:
Malo Edad Sexo nivel_estudios Estado Civil
1 35 Femenino Secundaria Union Libre
0 48 Femenino Bachillerato Casado
0 45 Masculino Bachillerato Casado
1 27 Femenino Bachillerato Union Libre
When I try to execute this piece of code:
tree_model= tree(Malo~., trainingSet)
Where Malo is my binary (0/1) column (of integers) that classifies the object as good or bad and Training set is a random partition of my test set.
I keep on getting this warning:
Warning message:
In tree(Malo ~ ., trainingSet) : NAs introduced by coercion
I don't understand why I am getting this. Help would be greatly appreciated.