Expand ~ into the home directory on Linux and MacOS (#6531)

This commit is contained in:
Philip Hyunsu Cho
2020-12-19 23:35:13 -08:00
committed by GitHub
parent cd0821500c
commit fbb980d9d3
7 changed files with 19 additions and 8 deletions

View File

@@ -66,6 +66,7 @@ xgb.dump <- function(model, fname = NULL, fmap = "", with_stats=FALSE,
if (is.null(fname)) {
return(model_dump)
} else {
fname <- path.expand(fname)
writeLines(model_dump, fname[1])
return(TRUE)
}