fix plenty of small bugs

This commit is contained in:
El Potaeto
2015-01-09 18:24:12 +01:00
parent b656ca1554
commit 51935851bd
5 changed files with 43 additions and 14 deletions

View File

@@ -47,7 +47,7 @@ xgb.dump <- function(model = NULL, fname = NULL, fmap = "", with.stats=FALSE) {
if(is.null(fname)) {
return(str_split(result, "\n") %>% unlist %>% str_replace("^\t+","") %>% Filter(function(x) x != "", .))
} else {
writeLines(result, fname)
result %>% str_split("\n") %>% unlist %>% Filter(function(x) x != "", .) %>% writeLines(fname)
return(TRUE)
}
}