I\'m using rpart to make a decision tree. For example:
rpart
fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
How do
Use as.formula:
as.formula
rpart_formula <- as.formula( paste("Kyphosis ~ ", paste(predictor_variables, collapse = " + "), sep = "" ) )