lib_dir, then
it will be overwritten. (lib_dir is usually a temporary
directory, so this is not a big problem.)make_packages(..., lib_dir = tempfile(), imports = character(),
quiet = TRUE)lib_dir The directory in which the packages are
installed.
package The named of the packages.
pkg <- make_packages(
foo1 = { f <- function() print("hello!") ; d <- 1:10 },
foo2 = { f <- function() print("hello again!") ; d <- 11:20 }
)
foo1::f()
foo2::f()
foo1::d
foo2::d
dispose_packages(pkg)
lib_dir and it points to an
existing directory, make_package overwrites the packages
there. If an error happens during installation or loading of
the disposables packages, then it will not restore the
original contents of lib_dir, but it will remove
all newly installed disposable packages, even the ones
that were installed cleanly.dispose_packages