[R] remove more uses of default values in internal functions (#9476)

This commit is contained in:
James Lamb
2023-08-14 09:18:33 -05:00
committed by GitHub
parent 2c84daeca7
commit e3f624d8e7
4 changed files with 16 additions and 4 deletions

View File

@@ -10,7 +10,13 @@ xgboost <- function(data = NULL, label = NULL, missing = NA, weight = NULL,
save_period = NULL, save_name = "xgboost.model",
xgb_model = NULL, callbacks = list(), ...) {
merged <- check.booster.params(params, ...)
dtrain <- xgb.get.DMatrix(data, label, missing, weight, nthread = merged$nthread)
dtrain <- xgb.get.DMatrix(
data = data,
label = label,
missing = missing,
weight = weight,
nthread = merged$nthread
)
watchlist <- list(train = dtrain)