[R] RPART error

From: victor pontes <victor_pontes_at_yahoo.com>
Date: Fri, 20 May 2011 11:15:07 -0700 (PDT)


Hi, I have been working generating decision tree analyses on large numbers of simulation datasets using the RPART function.  With some datasets, RPART is returning an error of "Error in yval[, 1] : incorrect number of dimensions".  There seem to be certain types of splits that cause it to break and return this message.  I am able to isolate the record at which this error message will begin appearing.  For example, there is a difference of one record in the enclosed files; one file (noproblem.csv) will correctly produce output.  The second (problem.csv), with only one additional record, will return the error message and no output.  I am running R 2.13.0 on a Windows XP platform.  To reproduce the problem: library(rpart) data <- read.csv("problem.csv", header=T)control=rpart.control(minbucket=10) x <- rpart(cad~v1+v2+v3+v4+v5+v6+v7+v8+v9+v10,data=data, method = "class", control=control) summary(x) Similar code run on "noproblem.csv" will not produce the error. Any suggestions on how to proceed to debug this issue would be greatly appreciated.  I am a novice R user, but not a novice programmer (SAS, some C, Java).  Thanks for your time. Victor Pontes Inatec, Inc. Medford, MA



R-help_at_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. Received on Fri 20 May 2011 - 23:06:01 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 20 May 2011 - 23:10:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive