p_unload_all | R Documentation |
p_unload_all
unloads in a safe order all packages, except the base and
recommended packages, that are attached or loaded in the namespace, plus their
respective DLLs.
It must be used before installing new versions of packages that are currently
loaded in the namespace and require some forced unloading, as revealed by the
first column of the data.frame produced by p_vers_deps
. Warning:
this function also removes RWsearch and its dependencies. It is therefore
recommended to perform the installation with install.packages
rather than p_inst
.
This function is safe enough to reinstall locked packages but not safe enough for a further use as it does not unload the S3 and S4 classes nor the documentation which is detected as corrupted. It is therefore recommend to stop and restart R after the installation of the fresh packages.
p_unload_all(unload = FALSE, crandb = get("crandb", envir = .GlobalEnv))
unload |
logical. |
crandb |
data.frame |
## In real life, download crandb from CRAN or load it from your directory
## with functions crandb_down() or crandb_load().
## In this example, we use a small file.
crandb_load(system.file("data", "zcrandb.rda", package = "RWsearch"))
p_unload_all()
## Then run p_unload_all(TRUE), but only for maintenance!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.