tests/testthat/setup.R

old_cli_width <- options(cli.width = 200)

if (require("withr")) {
  withr::defer(
    {
      options(old_cli_width)
      if (file.exists("Rplots.pdf")) file.remove("Rplots.pdf")
    },
    teardown_env()
  )
}

Try the officer package in your browser

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

officer documentation built on April 3, 2025, 10:27 p.m.