Skip to content
Prev 23027 / 398502 Next

unlist (rpart.object.list)

chr.schulz at email.de wrote:
Right, that's what unlist() does.


In ?bagging (package ipred), you will find in section "Value":

  Value 
  An object of class bagging: a list containing the following objects 

  mt   list of length nbagg containing rpart trees. 


So, following the first example in ?bagging, you get a list of trees
with:

 X <- as.data.frame(matrix(rnorm(1000), ncol=10))
 y <- factor(ifelse(apply(X, 1, mean) > 0, 1, 0))
 learn <- cbind(y, X)

 mt <- bagging(y ~., data=learn, coob=TRUE)
 mt$mt

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._