Learn R Programming

berryFunctions (version 1.21.2)

library2: 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.

See Also

install.packages, library

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
## Excluded fom CRAN checks. Package installation on server is unnecessary.
require2(ada)
library2("statmod")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab