I am currently trying to implement the bagging model in R and while searching about it I have found the formula of bagging model

bagging(formula, data, mfinal , control)

There are four attributes in the model

- Formula
- Data
- mfinal
- control

**formula**

as in the lm function.

**data**

a data frame, help to interpret the variables named in the formula

**mfinal**

an integer, the number of iterations for which boosting is run or the number of trees to use. Defaults to mfinal=100 iterations.

**control**

controls details of the rpart algorithm.

I have fairly understood the first three arguments but not able to understand the control argument and how it’s value affects the model performance.