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
)Value
a data frame of the unloaded package names, and whether they were attached, invisibly or NULL if the package is not loaded
Examples
pkg <- setup_and_get_dummy_srcpkg()
pkg_load(pkg)
pkg_unload(pkg)
#> executing unload on dummy.srcpkg