loadLibraries: Installs and loads packages

View source: R/utilities.R

loadLibrariesR Documentation

Installs and loads packages

Description

loadLibraries checks whether the package is already installed, installing those which are not preinstalled. All the libraries are then loaded.

Usage

loadLibraries(..., repo = "https://cran.rstudio.com")

Arguments

...

A list of packages

repo

The repository to load functions from. Defaults to "https://cran.rstudio.com"

Details

Especially useful when running on virtual machines where package installation is not persistent (Like UoS sve). It will fail if the packages need to be installed but there is no internet access.

NB: in R 'require' tries to load a package but throws a warning & moves on if it's not there whereas 'library' throws an error if it can't load the package. Hence 'loadLibraries' https://stackoverflow.com/questions/5595512/what-is-the-difference-between-require-and-library

Author(s)

Luke Blunden, lsb@soton.ac.uk (original)

Michael Harper m.harper@soton.ac.uk (revised version)


CfSOtago/GREENGridEECA documentation built on May 1, 2022, 8:08 p.m.