Randy Griffiths
2008-Jan-29 21:41 UTC
[R] rpart Error in yval[, 1] : incorrect number of dimensions
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). Does anyone have any ideas that might help? [[alternative HTML version deleted]]