[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

@@ -38,7 +38,7 @@ Supported input file formats are either a LIBSVM text file or a binary file that
}
\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))
xgb.DMatrix.save(dtrain, 'xgb.DMatrix.data')
dtrain <- xgb.DMatrix('xgb.DMatrix.data')
if (file.exists('xgb.DMatrix.data')) file.remove('xgb.DMatrix.data')