I'm using rpart to fit a tree using a large dataset: 7000 observations, 4651
variables. All but one of the variables (age) are binary. When I run the
code:

fit1 <- rpart(lowergi ~ ., data=dset,method="class")

I get the error:


Error in dimnames(X) <-list(dn[1L]], unlist(collabs, use.names=FALSE)) :

Length of `dimnames' [2] not equal to array extent



I have no idea what this error means or what is causing the problem. I'm
wondering if my dataset is too big, or if there is a problem with how the
data are set up. Any help would be appreciated.

        [[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.

Reply via email to