.onLoad <- function(libname, pkgname) {
mappings <- list(
"R_PACKRAT_DEFAULT_LIBPATHS" = .libPaths(),
"R_PACKRAT_SYSTEM_LIBRARY" = .Library,
"R_PACKRAT_SITE_LIBRARY" = .Library.site
)
enumerate(mappings, function(key, val) {
if (is.na(Sys.getenv(key, unset = NA)))
setenv(key, val)
})
renv$initialize()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.