I'm having the most weird problem with bagging function. For some unknown reason it does not improve the classification (compared to rpart), but instead gives much worse results ! Running rpart on my data gives error rate of about 0.3 and bagging, instead of improving this results, gives error rate of 0.9 !!! I'm running both rpart and bagging with exactly the same parameters, I even tried to run bagging() with nbagg=1, which should be identical to rpart, but still - bagging gives this terrible error rate. Any help would be appriciated.