We are trying to make a decision tree using rpart and we are continually running into the following error:
> fit_rpart=rpart(ENROLL_YN~MINORITY,method="class") > summary(fit_rpart) Call: rpart(formula = ENROLL_YN ~ MINORITY, method = "class") n= 5725 CP nsplit rel error 1 0 0 1 Error in yval[, 1] : incorrect number of dimensions ENROLL_YN is a categorical variable with two options- yes or no. MINORITY is also a categorical variable with two options- 0 or 1. We have confirmed that all variables are the same length and there are no NAs. Does anyone have any ideas that might help?? All thoughts would be appreciated, thanks! [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.