unshelf {librarian} | R Documentation |
Detach (unload) packages from the search path
Description
Packages can be detached by themselves, with their dependencies safely (i.e. as long as those dependencies are not being used by other packages), or with their dependencies unsafely (regardless of whether those dependencies are still needed). All non-default packages can be detached at once too, including Librarian itself.
Usage
unshelf(
...,
everything = FALSE,
also_depends = FALSE,
safe = TRUE,
quiet = TRUE
)
Arguments
... |
(Names) Packages as bare names. For packages that come from GitHub, you can keep the username/package format, or omit the username and provide just the package name. |
everything |
(Logical) If |
also_depends |
(Logical) If |
safe |
(Logical) If |
quiet |
(Logical) If |
Value
Invisibly returns a named logical vector, where the names are the packages
and TRUE
means that the package was successfully detached.
Examples
# These are the same:
#> unshelf(janitor, desiderata, purrr)
#> unshelf(janitor, DesiQuintans/desiderata, purrr)
# unshelf() returns invisibly; bind its output to a variable or access the .Last.value.
#> print(.Last.value)
#> desiderata janitor purrr
#> TRUE TRUE TRUE
#> unshelf(everything = TRUE)
#> print(.Last.value)
#> librarian testthat
#> TRUE TRUE