Expand ~ into the home directory on Linux and MacOS (#6531)
This commit is contained in:
committed by
GitHub
parent
cd0821500c
commit
fbb980d9d3
@@ -19,6 +19,7 @@ xgb.DMatrix.save <- function(dmatrix, fname) {
|
||||
if (!inherits(dmatrix, "xgb.DMatrix"))
|
||||
stop("dmatrix must be xgb.DMatrix")
|
||||
|
||||
fname <- path.expand(fname)
|
||||
.Call(XGDMatrixSaveBinary_R, dmatrix, fname[1], 0L)
|
||||
return(TRUE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user