usethis
load_all()
test()
base::on.exit()
withr::defer()
withr
tools/
DESCRIPTION
Imports
Suggests
usethis::use_package()
Depends
Linking to
NAMESPACE
R/
Config/Needs/*
testthat
test_that
on.exit()
skip()
README.md
.Rmd
.md
usethis::use_readme_rmd()
NEWS.md
usethis::use_news_md()
NEWS
withr::defer() is basically a drop-in substitute for on.exit().
pi #> [1] 3.141593 neater <- function(x, sig_digits) { op <- options(digits = sig_digits) defer(options(op)) print(x) } neater(pi, 2) #> [1] 3.1 pi #> [1] 3.141593