[R] Fix CRAN test notes. (#8428)

- Limit the number of used CPU cores in examples.
- Add a note for the constraint.
- Bring back the cleanup script.
This commit is contained in:
Jiaming Yuan
2022-11-09 02:03:30 +08:00
committed by GitHub
parent 8e76f5f595
commit 0b36f8fba1
22 changed files with 81 additions and 49 deletions

View File

@@ -158,9 +158,9 @@ Adapted from \url{https://en.wikipedia.org/wiki/Cross-validation_\%28statistics\
}
\examples{
data(agaricus.train, package='xgboost')
dtrain <- with(agaricus.train, xgb.DMatrix(data, label = label))
dtrain <- with(agaricus.train, xgb.DMatrix(data, label = label, nthread = 2))
cv <- xgb.cv(data = dtrain, nrounds = 3, nthread = 2, nfold = 5, metrics = list("rmse","auc"),
max_depth = 3, eta = 1, objective = "binary:logistic")
max_depth = 3, eta = 1, objective = "binary:logistic")
print(cv)
print(cv, verbose=TRUE)