fix save.raw

This commit is contained in:
hetong007 2015-02-09 17:35:50 -08:00
parent 4c25600d2a
commit 47b5cf5148

View File

@ -18,6 +18,9 @@
#' @export #' @export
#' #'
xgb.save.raw <- function(handle) { xgb.save.raw <- function(handle) {
if (class(handle) == "xgb.Booster"){
handle <- handle$handle
}
if (class(handle) == "xgb.Booster.handle") { if (class(handle) == "xgb.Booster.handle") {
raw <- .Call("XGBoosterModelToRaw_R", handle, PACKAGE = "xgboost") raw <- .Call("XGBoosterModelToRaw_R", handle, PACKAGE = "xgboost")
return(raw) return(raw)