Caret and dummy variables
问题 When calling the train function of the caret package, the data is automatically transformed so that all factor variables are turned into a set of dummy variables. How can I prevent this behaviour? Is it possible to say to caret "don't transform factors into dummy variables"? For example: If I run the rpart algorithm on the etitanic data: library(caret) library(earth) data(etitanic) etitanic$survived[etitanic$survived==1] <- 'YES' etitanic$survived[etitanic$survived!='YES'] <- 'NO' model<