From 98ee7e8057c79c9ff20c56379db2017a5fb1120e Mon Sep 17 00:00:00 2001 From: Tong He Date: Thu, 20 Nov 2014 15:14:05 -0800 Subject: [PATCH] Update xgboost.R add parameter missing --- R-package/R/xgboost.R | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/R-package/R/xgboost.R b/R-package/R/xgboost.R index 7859eb0c1..9bfd4108f 100644 --- a/R-package/R/xgboost.R +++ b/R-package/R/xgboost.R @@ -43,9 +43,14 @@ #' #' @export #' -xgboost <- function(data = NULL, label = NULL, params = list(), nrounds, +xgboost <- function(data = NULL, label = NULL, missing = NULL, params = list(), nrounds, verbose = 1, ...) { - dtrain <- xgb.get.DMatrix(data, label) + if (is.null(missing)) { + dtrain <- xgb.get.DMatrix(data, label) + } else { + dtrain <- xgb.get.DMatrix(data, label, missing) + } + params <- append(params, list(...)) if (verbose > 0) {