I use caret for xgbtree in R:
fitControl_2 <- trainControl(## 3-fold CV method = "repeatedcv", number = 3, repeats = 2, verboseIter = TRUE,