Skip to content

Commit

Permalink
allow plotting if all values are zero #13
Browse files Browse the repository at this point in the history
  • Loading branch information
TomKellyGenetics committed Mar 26, 2021
1 parent 0cf7120 commit de9cd3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/vioplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,13 @@ vioplot.default <-
names <- names(datas)
}
}
datas <- lapply(datas, function(x){
if(all(x == 0) & length(x) > 100){
0
} else {
x
}
})
if(is.character(log)) if("y" %in% unlist(strsplit(log, ""))) log <- TRUE
if(is.na(xlog) | (horizontal == TRUE & (log == FALSE | log == ""))) xlog <- FALSE
log <- ifelse(log == TRUE, "y", "")
Expand Down

0 comments on commit de9cd3b

Please sign in to comment.