fix save.raw
This commit is contained in:
parent
4c25600d2a
commit
47b5cf5148
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user