I am trying to make a decision tree using rpart. The function runs very quickly considering the size of the data (1742, 163). When I call the summary command I get this:
> summary(bookings.cart) Call: rpart(formula = totalRev ~ ., data = bookings, method = "class") n=1741 (1 observation deleted due to missingness) CP nsplit rel error 1 0 0 1 Error in yval[, 1] : incorrect number of dimensions note: > dim(bookings) [1] 1742 163 I have run rpart on past projects without any problems. I have used a catagorical version of the variable totalRev that was partitioned into four levels (and coded as a factor). I tried making a tree with the tree command (in the 'tree' package) and was able to construct a tree without any errors. However, I would much rather use rpart. Does anyone have any ideas that might help? [[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.