do <- function() {
old <- Sys.getenv("R_PKG_CACHE_DIR", NA_character_)
if (is.na(old)) {
on.exit(Sys.unsetenv("R_PKG_CACHE_DIR"), add = TRUE)
} else {
on.exit(Sys.setenv("R_PKG_CACHE_DIR" = old), add = TRUE)
}
Sys.setenv("R_PKG_CACHE_DIR" = tempfile())
library(pak)
library(testthat)
test_check("pak", reporter = "summary")
}
if (Sys.getenv("NOT_CRAN") == "true") {
do()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.