[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

@@ -88,7 +88,7 @@ xgb.DMatrix <- function(data, info = list(), missing = NA, silent = FALSE, nthre
# get dmatrix from data, label
# internal helper method
xgb.get.DMatrix <- function(data, label = NULL, missing = NA, weight = NULL, nthread = NULL) {
xgb.get.DMatrix <- function(data, label, missing, weight, nthread) {
if (inherits(data, "dgCMatrix") || is.matrix(data)) {
if (is.null(label)) {
stop("label must be provided when data is a matrix")