pkg_unload {srcpkgs}R Documentation

unloads a package, unloading its dependent packages if needed

Description

To be able to unload properly a package, all the packages that depend even indirectly on it should be unloaded first.

Usage

pkg_unload(
  pkg_or_name,
  src_pkgs = get_srcpkgs(),
  dry_run = FALSE,
  loaded = loadedNamespaces(),
  quiet = FALSE
)

Arguments

pkg_or_name

a package name or object ("package" or "srcpkg")

src_pkgs

a collection of source packages as a srckgs object.

dry_run

whether not to actually execute any action having side-effects

loaded

the loaded packages, useful for testing.

quiet

whether to be quiet/silent

Details

N.B: this function also works for non source packages.

Value

a data frame of the unloaded package names, and whether they were attached, invisibly or NULL if the package is not loaded

Examples


plan <- pkg_unload('mypkg')


[Package srcpkgs version 0.1 Index]