Learn R Programming

berryFunctions (version 1.15.0)

library2: install.package and require

Description

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

Usage

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

Arguments

name
Name of the package(s). Can be qouted, must not.
libargs
List of arguments passed to library like lib.loc, quietly 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: ------------------------------------
# ## Excluded fom CRAN checks. Package installation on server is unnecessary.
# require2(ada)
# library2("statmod")
## ---------------------------------------------

Run the code above in your browser using DataLab