Title: Check, Install and Load CRAN Packages
Version: 1.2.5
Author: maloneypatr [aut, cre], Irucka Embry [aut, ctb]
Maintainer: Irucka Embry <iembry@ecoccs.com>
Depends: R (≥ 2.14.1)
Imports: utils, fastmatch, checkmate, assertthat
Suggests: tinytest, spelling
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'.
URL: https://gitlab.com/iembry/install.load
BugReports: https://gitlab.com/iembry/install.load/-/issues
License: CC BY-SA 4.0 | GPL-3 | file LICENSE
Copyright: file COPYRIGHT
Language: en-US
Encoding: UTF-8
RoxygenNote: 7.2.3
NeedsCompilation: no
Packaged: 2023-08-20 22:01:30 UTC; xbyri
Repository: CRAN
Date/Publication: 2023-08-21 07:42:36 UTC

install.load: Check, Install and Load CRAN Packages

Description

install.load provides the function 'install_load' which 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 Repository. Lastly, the chosen package(s) is/are loaded. The function 'load_package' simply loads the provided package(s).

See Also

Useful links:


Check, Install and Load CRAN Packages

Description

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.

Usage

install_load(package1, ...)

Arguments

package1

R package.

...

Any additional R packages.

Value

Install and load package1 and other packages listed in the arguments ... and all of the dependencies.

Author(s)

maloneypatr, Irucka Embry

Source

  1. 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.

  2. 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/.

See Also

load_package to only load packages, installed.packages, install.packages

Examples

## 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)



Load Packages

Description

Loads the listed packages only

Usage

load_package(package1, ...)

Arguments

package1

R package.

...

Any additional R packages.

Value

Load package1 and other packages listed in the arguments ....

Author(s)

maloneypatr, Irucka Embry

Source

  1. 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.

  2. 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/.

See Also

install_load if you are wanting to install and load packages

Examples

## 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)