p_load {pacman} | R Documentation |
Load One or More Packages
Description
This function is a wrapper for library
and
require
. It checks to see if a
package is installed, if not it attempts to install the package from CRAN
and/or any other repository in the pacman repository list.
Usage
p_load(..., char, install = TRUE, update = getOption("pac_update"),
character.only = FALSE)
Arguments
char |
Character vector containing packages to load. If you are calling
|
install |
logical. If |
update |
logical. If |
character.only |
logical. If |
... |
name(s) of package(s). |
See Also
library
,
require
,
install.packages
Examples
## Not run:
p_load(lattice)
p_unload(lattice)
p_load(lattice, foreign, boot, rpart)
p_loaded()
p_unload(lattice, foreign, boot, rpart)
p_loaded()
## End(Not run)