I would say that the use of Reduce in this context is bad practice.
from ?Reduce :
"Reduce uses a binary function to successively combine the elements of
a given vector and a possibly given initial value."
combine() is obviously not a binary function. do.call() seems to be
THE appropriate idiom.
HI,
Using the example in ?combine
library(randomForest)
rf1 <- randomForest(Species ~ ., iris, ntree=50, norm.votes=FALSE)
rf2 <- randomForest(Species ~ ., iris, ntree=50, norm.votes=FALSE)
rf3 <- randomForest(Species ~ ., iris, ntree=50, norm.votes=FALSE)
rf.all <- combine(rf1, r
2 matches
Mail list logo