Merge branch 'master' of github.com:haozhu233/kableExtra
diff --git a/R/mini_plots.R b/R/mini_plots.R
index fc07ce5..fc8e031 100644
--- a/R/mini_plots.R
+++ b/R/mini_plots.R
@@ -38,7 +38,7 @@
file_type = if (is_latex()) "pdf" else "svg", ...) {
if (is.list(x)) {
if (same_lim & is.null(lim)) {
- lim <- base::range(unlist(x))
+ lim <- base::range(unlist(x), na.rm=TRUE)
}
dots <- listify_args(x, width, height, res, breaks,
@@ -51,7 +51,7 @@
if (is.null(x)) return(NULL)
if (is.null(lim)) {
- lim <- base::range(x)
+ lim <- base::range(x, na.rm=TRUE)
}
if (!dir.exists(dir)) {
@@ -131,7 +131,7 @@
file_type = if (is_latex()) "pdf" else "svg", ...) {
if (is.list(x)) {
if (same_lim & is.null(lim)) {
- lim <- base::range(unlist(x))
+ lim <- base::range(unlist(x), na.rm=TRUE)
}
dots <- listify_args(x, width, height, res,
@@ -145,7 +145,7 @@
if (is.null(x)) return(NULL)
if (is.null(lim)) {
- lim <- base::range(x)
+ lim <- base::range(x, na.rm=TRUE)
lim[1] <- lim[1] - (lim[2] - lim[1]) / 10
lim[2] <- (lim[2] - lim[1]) / 10 + lim[2]
}