| Title: | Check, Install and Load CRAN Packages |
|---|---|
| Description: | The function 'install_load' checks the local R library(ies) to see if the required package(s) is/are installed or not. If the package(s) is/are not installed, then the package(s) will be installed along with the required dependency(ies). This function pulls source or binary packages from the Posit/RStudio-sponsored CRAN mirror. Lastly, the chosen package(s) is/are loaded. The function 'load_package' simply loads the provided package(s). If this package does not fit your needs, then you may want to consider these other R packages: 'needs', 'easypackages', 'pacman', 'pak', 'anyLib', and/or 'librarian'. |
| Authors: | maloneypatr [aut, cre], Irucka Embry [aut, ctb] |
| Maintainer: | Irucka Embry <[email protected]> |
| License: | CC BY-SA 4.0 | GPL-3 | file LICENSE |
| Version: | 1.2.5 |
| Built: | 2026-05-24 08:02:43 UTC |
| Source: | https://gitlab.com/iembry/install.load |
Checks the local R library(ies) to see if the required package(s) is/are installed or not. If the package(s) is/are not installed, then the package(s) will be installed along with the required dependency(ies). This function pulls source or binary packages from the 0-Cloud CRAN Repository. Lastly, the chosen package(s) is/are loaded.
install_load(package1, ...)install_load(package1, ...)
package1 |
R package. |
... |
Any additional R packages. |
Install and load package1 and other packages listed
in the arguments ... and all of the dependencies.
maloneypatr, Irucka Embry
Check if R package is installed then load library answered by maloneypatr is the source for the original function. See https://stackoverflow.com/questions/15155814/check-if-r-package-is-installed-then-load-library.
Error Handling in R By Nina Zumel, October 9, 2012, Win Vector LLC. See https://win-vector.com/2012/10/09/error-handling-in-r/.
load_package to only load packages, installed.packages,
install.packages
## Not run: library("install.load") # This will install, if not already installed, and load the package(s) install_load("chron") install_load("chron", "data.table", "dataRetrieval", "EGRET", "dplyr") ## End(Not run)## Not run: library("install.load") # This will install, if not already installed, and load the package(s) install_load("chron") install_load("chron", "data.table", "dataRetrieval", "EGRET", "dplyr") ## End(Not run)
Loads the listed packages only
load_package(package1, ...)load_package(package1, ...)
package1 |
R package. |
... |
Any additional R packages. |
Load package1 and other packages listed in the arguments ....
maloneypatr, Irucka Embry
Check if R package is installed then load library answered by maloneypatr is the source for the original function. See https://stackoverflow.com/questions/15155814/check-if-r-package-is-installed-then-load-library.
Error Handling in R By Nina Zumel, October 9, 2012, Win Vector LLC. See https://win-vector.com/2012/10/09/error-handling-in-r/.
install_load if you are wanting to install and load packages
## Not run: library("install.load") # This will only load the package(s) load_package("chron") load_package("chron", "data.table", "dataRetrieval", "EGRET", "dplyr") ## End(Not run)## Not run: library("install.load") # This will only load the package(s) load_package("chron") load_package("chron", "data.table", "dataRetrieval", "EGRET", "dplyr") ## End(Not run)