R documentation: Make construction of DMatrix consistent.

* Fix inconsistency of construction of DMatrix.
* Fix missing parameters.
This commit is contained in:
ReeceGoding
2021-03-19 17:55:13 +00:00
committed by GitHub
parent 642336add7
commit c2b6b80600
5 changed files with 11 additions and 17 deletions

View File

@@ -112,7 +112,7 @@
#'
#' @examples
#' data(agaricus.train, package='xgboost')
#' dtrain <- xgb.DMatrix(agaricus.train$data, label = agaricus.train$label)
#' dtrain <- with(agaricus.train, xgb.DMatrix(data, label = label))
#' cv <- xgb.cv(data = dtrain, nrounds = 3, nthread = 2, nfold = 5, metrics = list("rmse","auc"),
#' max_depth = 3, eta = 1, objective = "binary:logistic")
#' print(cv)