pkg_load | R Documentation |
This function is a wrapper for require
and
detach
. pkg_load
checks to see if a
package is installed, if not it attempts to install the package
from CRAN. pkg_unload
can detach one or more loaded packages.
pkg_load(..., pkg_names = NULL)
pkg_unload(..., pkg_names = NULL)
... |
Name(s) of package(s). |
pkg_names |
(Optional)Character vector containing packages to load
or unload. Default uses |
require
,
detach
,
p_load
,
p_unload
## Not run:
pkg_load(data.table)
pkg_unload(data.table)
pkg_load(stringr,fst)
pkg_unload(stringr,fst)
pkg_load(pkg_names = c("data.table","fst"))
p_unload(pkg_names = c("data.table","fst"))
pkg_load(data.table,stringr,fst)
pkg_unload("all") # shortcut to unload all loaded packages
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.