library2: install.package and library

View source: R/library2.R

library2R Documentation

install.package and library

Description

install and load a package. If a package is not available, it is installed before being loaded

Usage

library2(name, quietly = FALSE, libargs = NULL, ...)

Arguments

name

Name of the package(s). Can be quoted, must not.

quietly

passed to library. DEFAULT: FALSE

libargs

List of arguments passed to library like lib.loc, verbose etc. DEFAULT: NULL

...

Arguments passed to install.packages like lib, repos etc.

Value

messages help instruction.

Note

Passing a vector with packages will work, but give some warnings.

Author(s)

Berry Boessenkool, berry-b@gmx.de, 2014+2020

See Also

install.packages, library

Examples


## Not run: 
## Excluded fom CRAN checks. Package installation on server is unnecessary.
require2(ada)
library2("statmod")

## End(Not run)


berryFunctions documentation built on April 12, 2023, 12:36 p.m.