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 Sept. 13, 2023, 9:06 a.m.