library2 {berryFunctions}R 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)


[Package berryFunctions version 1.20.1 Index]