tests/testthat/setup.R

# Helper function for snapshots
gg_in_tmp_png <- function(plot_code, width = 4, height = 4) {
  path <- tempfile(fileext = ".png")
  ggsave(path, plot=plot_code, width = width, height = height)

  path
}

Try the LSTbook package in your browser

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

LSTbook documentation built on April 3, 2025, 6:02 p.m.