title: Why doesnt the early.stop.round argument in xgboost work?
body: <p>I try to use the <code>early.stop.round</code> argument in the <code>xgb.cv</code> function of the <code>xgboost</code> library, however, I got an error. After I leave the <code>early.stop.round</code> unspecified, the function runs without any problem. What did I do wrong? </p>
  
  <p>Here is my example code:</p>
  
  <pre><code>library(xgboost)
  
  train = matrix(as.numeric(1:100),20,5)
  Y = rep(c(0,1),10)
  dtrain = xgb.DMatrix(train, label=Y)
  
  #cross validation when early.stop.round =5, gives an error
  CV = xgb.cv(data = dtrain, nround=200, nfold =2, metrics=list("auc"), 
              objective = "binary:logistic",early.stop.round = 5)
  
  
  #cross validation when early.stop.round is not specified, works
  CV = xgb.cv(data = dtrain, nround=200, nfold =2, metrics=list("auc"),
              objective = "binary:logistic")
  </code></pre>
  
  <p>I am using <code>xgboost_0.4-2</code></p>