| dispose_packages {disposables} | R Documentation |
Get rid of temporary packages
Description
Get rid of temporary packages
Usage
dispose_packages(packages, unattach = TRUE, unload = unattach,
delete = TRUE, delete_lib_dir = delete)
Arguments
packages |
A list returned by |
unattach |
Whether to unattach the packages. |
unload |
Whether to unload the packages. It is not possible to unload without unattaching. |
delete |
Whether to delete the installed packages from the
|
delete_lib_dir |
Whether to delete the the whole |
Examples
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
## Unattach only
dispose_packages(pkg, unload = FALSE, delete = FALSE)
"package:foo1" %in% search()
"foo1" %in% loadedNamespaces()
dir(pkg$lib_dir)
## Unload
dispose_packages(pkg, delete = FALSE)
"package:foo1" %in% search()
"foo1" %in% loadedNamespaces()
dir(pkg$lib_dir)
## Delete completely
dispose_packages(pkg)
"package:foo1" %in% search()
"foo1" %in% loadedNamespaces()
file.exists(pkg$lib_dir)
[Package disposables version 1.0.3 Index]