tests/testthat/helper_dont_plot.R

# Capture plots without plotting
dont_plot <- function(x, f = graphics::plot, ...) {
  tmp <- tempfile()
  grDevices::png(tmp)
  p <- f(x, ...)
  grDevices::dev.off()
  unlink(tmp)
  invisible(p)
}

Try the qualpalr package in your browser

Any scripts or data that you put into this service are public.

qualpalr documentation built on May 2, 2019, 3:31 a.m.