diff --git a/R/graphics_helpers.R b/R/graphics_helpers.R
index 993a9c3..b74d439 100644
--- a/R/graphics_helpers.R
+++ b/R/graphics_helpers.R
@@ -183,7 +183,7 @@
       function(L, nm) {
         if (is.null(L)) return(list(NULL))
         if (!is.list(L)) return(list(L))
-        if (is.na(lengths) || length(L) %in% lengths) return(L)
+        if ((length(lengths) == 1 && is.na(lengths)) || length(L) %in% lengths) return(L)
         stop("length of '", nm, "' must be one of: ", paste(lengths, collapse = " or "))
       }, indots[ nms ], nms))
   }
@@ -197,7 +197,7 @@
         if (is.null(L)) return(list(NULL))
         if (!length(L)) return(list(list()))
         if (!is.list(L[[1]])) return (list(L))
-        if (is.na(lengths) || length(L) %in% lengths) return(L)
+        if ((length(lengths) == 1 && is.na(lengths)) || length(L) %in% lengths) return(L)
         stop("length of '", nm, "' must be one of: ", paste(lengths, collapse = " or "))
       }, indots[ nms ], nms))
   }
@@ -210,7 +210,7 @@
       function(V, nm) {
         if (is.null(V)) return(list(NULL))
         if (is.function(V)) return(list(V))
-        if (is.na(lengths) || length(V) %in% lengths) return(V)
+        if ((length(lengths) == 1 && is.na(lengths)) || length(V) %in% lengths) return(V)
         stop("length of '", nm, "' must be one of: ", paste(lengths, collapse = " or "))
       }, indots[ nms ], nms))
   }
diff --git a/R/kableExtra-package.R b/R/kableExtra-package.R
index 799dac1..48543e2 100644
--- a/R/kableExtra-package.R
+++ b/R/kableExtra-package.R
@@ -68,7 +68,7 @@
 #' @importFrom utils read.csv head capture.output
 #' @importFrom scales rescale
 #' @importFrom viridisLite viridis
-#' @importFrom stats ave density median
+#' @importFrom stats ave density median na.omit setNames
 #' @importFrom grDevices col2rgb svg png
 #' @importFrom rstudioapi isAvailable viewer
 #' @importFrom glue glue
diff --git a/R/mini_plots.R b/R/mini_plots.R
index fc8e031..cef8c5e 100644
--- a/R/mini_plots.R
+++ b/R/mini_plots.R
@@ -2,14 +2,17 @@
 #'
 #' @description These functions helps you quickly generate sets of sparkline
 #' style plots using base R plotting system. Currently, we support histogram,
-#' boxplot, and line. You can use them together with `column_spec` to
-#' generate inline plot in tables. By default, this function will save images
-#' in a folder called "kableExtra" and return the address of the file.
+#' boxplot, line, scatter and pointrange plots. You can use them together with
+#' `column_spec` to generate inline plot in tables. By default, this function
+#' will save images in a folder called "kableExtra" and return the address of
+#' the file.
 #'
 #' @param x Vector of values or List of vectors of values.
 #' @param width The width of the plot in pixel
 #' @param height The height of the plot in pixel
 #' @param res The resolution of the plot. Default is 300.
+#' @param breaks The `break` option in `hist`. Default is "Sturges" but you can
+#' also provide a vector to manually specify break points.
 #' @param same_lim T/F. If x is a list of vectors, should all the plots be
 #' plotted in the same range? Default is True.
 #' @param lim Manually specify plotting range in the form of
@@ -88,9 +91,10 @@
 #'
 #' @description These functions helps you quickly generate sets of sparkline
 #' style plots using base R plotting system. Currently, we support histogram,
-#' boxplot, and line. You can use them together with `column_spec` to
-#' generate inline plot in tables. By default, this function will save images
-#' in a folder called "kableExtra" and return the address of the file.
+#' boxplot, line, scatter and pointrange plots. You can use them together with
+#' `column_spec` to generate inline plot in tables. By default, this function
+#' will save images in a folder called "kableExtra" and return the address of
+#' the file.
 #'
 #' @param x Vector of values or List of vectors of values.
 #' @param width The width of the plot in pixel
@@ -101,9 +105,8 @@
 #' Default is 2.
 #' @param same_lim T/F. If x is a list of vectors, should all the plots be
 #' plotted in the same range? Default is True.
-#' @param lim,xlim,ylim Manually specify plotting range in the form of
-#' `c(0, 10)`. `lim` is used in `spec_hist` and `spec_boxplot`; `xlim`
-#' and `ylim` are used in `spec_plot`.
+#' @param lim Manually specify plotting range in the form of
+#' `c(0, 10)`.
 #' @param xaxt On/Off for xaxis text
 #' @param yaxt On/Off for yaxis text
 #' @param ann On/Off for annotations (titles and axis titles)
@@ -170,10 +173,10 @@
   graphics::par(mar = c(0, 0, 0, 0))
 
   graphics::boxplot(x, horizontal = TRUE, ann = ann, frame = FALSE, bty = 'n', ylim = lim,
-          col = col, border = border,
-          boxlty = boxlty, medcol = medcol, medlwd = medlwd,
-          axes = FALSE, outcex = 0.2, whisklty = 1,
-          ...)
+                    col = col, border = border,
+                    boxlty = boxlty, medcol = medcol, medlwd = medlwd,
+                    axes = FALSE, outcex = 0.2, whisklty = 1,
+                    ...)
   if (add_label) {
     x_median <- round(median(x, na.rm = T), label_digits)
     x_min <- round(min(x, na.rm = T), label_digits)
@@ -207,9 +210,10 @@
 #'
 #' @description These functions helps you quickly generate sets of sparkline
 #' style plots using base R plotting system. Currently, we support histogram,
-#' boxplot, and line. You can use them together with `column_spec` to
-#' generate inline plot in tables. By default, this function will save images
-#' in a folder called "kableExtra" and return the address of the file.
+#' boxplot, line, scatter and pointrange plots. You can use them together with
+#' `column_spec` to generate inline plot in tables. By default, this function
+#' will save images in a folder called "kableExtra" and return the address of
+#' the file.
 #'
 #' @param x,y Vector of values or List of vectors of values. y is optional.
 #' @param width The width of the plot in pixel
@@ -349,7 +353,7 @@
 
   if (!is.na(polymin)) {
     lty <- if ("lty" %in% names(dots)) dots$lty else graphics::par("lty")
-    polygon(c(x[1], x, x[length(x)]), c(polymin, y, polymin),
+    graphics::polygon(c(x[1], x, x[length(x)]), c(polymin, y, polymin),
             border = NA, col = col, angle = angle, lty = lty,
             xpd = if ("xpd" %in% names(dots)) dots$xpd else NA)
   }
@@ -374,3 +378,109 @@
     del = TRUE)
   return(out)
 }
+
+
+#' Helper functions to generate inline sparklines
+#'
+#' @description These functions helps you quickly generate sets of sparkline
+#' style plots using base R plotting system. Currently, we support histogram,
+#' boxplot, line, scatter and pointrange plots. You can use them together with
+#' `column_spec` to generate inline plot in tables. By default, this function
+#' will save images in a folder called "kableExtra" and return the address of
+#' the file.
+#'
+#' @param x,xmin,xmax A scalar value or List of scalar values for dot, left
+#' and right errorbar.
+#' @param vline A scalar value for where to draw a vertical line.
+#' @param width The width of the plot in pixel
+#' @param height The height of the plot in pixel
+#' @param res The resolution of the plot. Default is 300.
+#' @param same_lim T/F. If x is a list of vectors, should all the plots be
+#' plotted in the same range? Default is True.
+#' @param lim Manually specify plotting range in the form of
+#' `c(0, 10)`.
+#' @param xaxt On/Off for xaxis text
+#' @param yaxt On/Off for yaxis text
+#' @param ann On/Off for annotations (titles and axis titles)
+#' @param col Color for the fill of the histogram bar/boxplot box.
+#' @param cex size of the mean dot and error bar size.
+#' @param frame.plot T/F for whether to plot the plot frames.
+#' @param dir Directory of where the images will be saved.
+#' @param file File name. If not provided, a random name will be used
+#' @param file_type Graphic device. Can be character (e.g., `"pdf"`)
+#'   or a graphics device function (`grDevices::pdf`). This defaults
+#'   to `"pdf"` if the rendering is in LaTeX and `"svg"` otherwise.
+#' for HTML output
+#' @param ... extra parameters sending to `hist()`
+#'
+#' @export
+spec_pointrange <- function(
+  x, xmin, xmax, vline = NULL,
+  width = 200, height = 50, res = 300,
+  same_lim = TRUE, lim = NULL,
+  xaxt = 'n', yaxt = 'n', ann = FALSE,
+  col = "red", cex = 0.3, frame.plot = FALSE,
+  dir = if (is_latex()) rmd_files_dir() else tempdir(),
+  file = NULL,
+  file_type = if (is_latex()) "pdf" else "svg", ...) {
+  if (length(x) > 1) {
+    if (same_lim & is.null(lim)) {
+      all_range <- c(unlist(xmin), unlist(xmax))
+      lim <- base::range(all_range, na.rm=TRUE)
+      lim <- lim + c(-0.04 * diff(lim), 0.04 * diff(lim))
+    }
+
+    dots <- listify_args(
+      x = as.list(x), xmin = as.list(xmin), xmax = as.list(xmax), vline,
+      width, height, res,
+      lim, xaxt, yaxt, ann, col, cex, frame.plot,
+      dir, file, file_type,
+      lengths = c(1, length(x)),
+      passthru = c("x", "xmin", "xmax"))
+    return(do.call(Map, c(list(f = spec_pointrange), dots)))
+  }
+
+  if (is.null(x)) return(NULL)
+
+  if (is.null(lim)) {
+    one_range <- unlist(c(xmin, xmax))
+    lim <- base::range(one_range, na.rm=TRUE)
+    lim <- lim + c(-0.04 * diff(lim), 0.04 * diff(lim))
+  }
+
+  if (!dir.exists(dir)) {
+    dir.create(dir)
+  }
+
+  file_ext <- dev_chr(file_type)
+  if (is.null(file)) {
+    file <- normalizePath(
+      tempfile(pattern = "pointrange_", tmpdir = dir, fileext = paste0(".", file_ext)),
+      winslash = "/", mustWork = FALSE)
+  }
+
+  graphics_dev(filename = file, dev = file_type,
+               width = width, height = height, res = res,
+               bg = "transparent")
+  curdev <- grDevices::dev.cur()
+  on.exit(grDevices::dev.off(curdev), add = TRUE)
+
+  graphics::par(mar = c(0, 0, 0.2, 0), lwd=1,
+                ann = ann, xaxt = xaxt, yaxt = yaxt)
+
+  graphics::plot(x, 0, type = "p", pch = ".",
+                 xlim = lim, frame.plot = frame.plot)
+  graphics::arrows(xmin, 0, xmax, 0, cex / 15, angle = 90, code = 3)
+  graphics::points(x, 0, col = col, type = "p", pch = 15, cex = cex)
+  if (!is.null(vline)) {
+    graphics::abline(v = vline, lty = 3)
+  }
+
+  grDevices::dev.off(curdev)
+
+  out <- make_inline_plot(
+    file, file_ext, file_type,
+    width, height, res,
+    del = TRUE)
+  return(out)
+}
diff --git a/R/save_kable.R b/R/save_kable.R
index fe80d8f..c8b7185 100644
--- a/R/save_kable.R
+++ b/R/save_kable.R
@@ -188,7 +188,7 @@
   output <- normalizePath(output)
   template <- tempfile(fileext = ".html")
   on.exit(unlink(template), add = TRUE)
-  rmarkdown:::write_utf8("$body$", template)
+  write_utf8("$body$", template)
   from <- if (rmarkdown::pandoc_available("1.17")) "markdown_strict" else "markdown"
   rmarkdown::pandoc_convert(
     input = input, from = from, output = output,
@@ -197,6 +197,13 @@
   invisible(output)
 }
 
+# Local version of rmarkdown:::write_utf8
+write_utf8 <- function (text, con, ...) {
+  opts <- options(encoding = "native.enc")
+  on.exit(options(opts), add = TRUE)
+  writeLines(enc2utf8(text), con, ..., useBytes = TRUE)
+}
+
 
 
 remove_html_doc <- function(x){
