tests/testthat/helper.R

withr_local_file <- function(env = parent.frame()) {
  path <- tempfile(fileext = ".csv")
  writeLines(c("a,b", "1,2"), path)
  do.call(on.exit, list(substitute(unlink(path)), add = TRUE), envir = env)
  path
}

Try the metascience package in your browser

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

metascience documentation built on Nov. 23, 2026, 5:07 p.m.