local_temppkg | R Documentation |
Temporarily create a rdev or R analysis package, which is automatically removed afterwards.
local_temppkg(dir = fs::file_temp(), type = "usethis", env = parent.frame())
dir |
Path to package directory, created if necessary, defaults to |
type |
type of package to create, one of "usethis" - |
env |
Environment passed to |
Used internally for testing rdev automation. Based on the
usethis case study
from testthat
.
Path to temporary package directory.
withr::withr-package
## Not run:
test_that("local_temppkg creates a directory", {
dir <- usethis::ui_silence(local_temppkg())
expect_true(fs::dir_exists(dir))
})
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.