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 Aug. 19, 2025, 1:14 a.m.