I would like to collect the trees grown by rpart fits in an array, in order to be able to use them later to predict new data. I have tried to use parse and eval to do this, without success. I'd be very grateful if someone could explain how to do it.
The kind of thing I hope to do is: resmat=array(NA, 100) for (run in 1:100) resmat[run]=rpart(y~., data=train[run]) So that, later, I can do: for (run in 1:100) pred[run]=predict(resmat[run], newdat) But, resmat[run] does not work, even though it saves the cptables. Thanks, in advance, Jonathan Williams OPTIMA Radcliffe Infirmary Woodstock Road OXFORD OX2 6HE Tel +1865 (2)24356 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html