R maintenance Feb2017 (#2045)

* [R] better argument check in xgb.DMatrix; fixes #1480

* [R] showsd was a dummy; fixes #2044

* [R] better categorical encoding explanation in vignette; fixes #1989

* [R] new roxygen version docs update
This commit is contained in:
Vadim Khotilovich
2017-02-20 12:02:40 -06:00
committed by Tianqi Chen
parent 63aec12a13
commit b4d97d3cb8
42 changed files with 19 additions and 48 deletions

View File

@@ -20,6 +20,9 @@
xgb.DMatrix <- function(data, info = list(), missing = NA, ...) {
cnames <- NULL
if (typeof(data) == "character") {
if (length(data) > 1)
stop("'data' has class 'character' and length ", length(data),
".\n 'data' accepts either a numeric matrix or a single filename.")
handle <- .Call("XGDMatrixCreateFromFile_R", data, as.integer(FALSE),
PACKAGE = "xgboost")
} else if (is.matrix(data)) {