R/test-helpers.R

Defines functions save_png

Documented in save_png

#' Function for saving png of biplot
#' @keywords internal

save_png <- function(code, width = 400, height = 400) {
  path <- tempfile(fileext = ".png")
  set.seed(5)
  grDevices::png(path, width = width, height = height)
  on.exit(grDevices::dev.off())
  code
  
  path
}
gordy2x/saint documentation built on Feb. 29, 2024, 8:09 p.m.