Skip to content

Commit 6bec4fb

Browse files
authored
Merge pull request #37 from rix133/master
Fixing the Windows save problem
2 parents 8883f7a + 00e0fe9 commit 6bec4fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/visualization_functions.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,8 @@ color_kegg_pathway <- function(pw_id, change_vec, normalize_vals = TRUE,
578578

579579
### determine limit
580580
lim <- round(max(abs(vals)), 2)
581+
### if no vals exist set lim to 1 maybe raise a warning also
582+
lim <- ifelse(is.na(lim), 1, lim)
581583

582584
### generate low colors
583585
low_vals <- vals[vals < 0]
@@ -659,6 +661,7 @@ download_kegg_png <- function(pw_url, f_path, quiet = TRUE) {
659661
res <- tryCatch({
660662
cond <- utils::download.file(url = pw_url,
661663
destfile = f_path,
664+
mode = "wb",
662665
quiet = quiet)
663666
cond
664667
}, error = function(e) {

0 commit comments

Comments
 (0)