Description Usage Arguments Examples
Get rid of temporary packages
1 2  | dispose_packages(packages, unattach = TRUE, unload = unattach,
  delete = TRUE, delete_lib_dir = delete)
 | 
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   | 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  | 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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.