# This is a VERY trimmed down version of create_local_thing from usethis
local_package_create <- function(envir = parent.frame()) {
dir <- withr::local_tempdir(.local_envir = envir)
usethis::ui_silence({
create_package(dir, rstudio = FALSE, open = FALSE, check_name = FALSE)
})
dir
}
local_package_copy <- function(path, env = parent.frame()) {
temp_path <- withr::local_tempdir(.local_envir = env)
dir_copy(path, temp_path, overwrite = TRUE)
temp_path
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.