Whenever I try to run the following script,
lm.fit <- glm(res~., data=train) #res is class of my dataset
I get the following error
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
contrasts can be applied only to factors with 2 or more levels
my dataset details:
15 variable, 10 of them are integer and 5 of them are factor.