In the adabag package there is a function called bagging:
Vehicle.bagging <- bagging(Class ~.,data=Vehicle[sub, ],mfinal=20, control=rpart.control(maxdepth=5, minsplit=15))
the maxdepth is the number of levels in the trees??The minsplit is the minimum number of splits i guess.So if a tree has 5 levels does minsplit specify the splits at each level or that the minimum number of splits till level 5 has to be 15??
Also,it seems like this is like a random forest which is an ensemble of trees,then why do we use bagging to combine decision trees and not random forest??