diff --git a/R/vioplot.R b/R/vioplot.R index fa6ad73..41fec13 100755 --- a/R/vioplot.R +++ b/R/vioplot.R @@ -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", "")