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
}

Try the ecoCopula package in your browser

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

ecoCopula documentation built on Dec. 4, 2025, 9:08 a.m.