using: Intelligently load libraries

Description Usage Arguments Examples

View source: R/using.R

Description

Load a list of libraries. If the library is not installed install it and load it. If using is called during R startup, such as in a .Rprofile file append the package(s) to the "defaultPackages" option to induce loading at the appropriate time.

Usage

1
2
3
using(..., install.missing = getOption("using::install.missing",
  !is.null(getOption("repos"))), quiet = getOption("using::quiet",
  interactive()))

Arguments

...

a list of packages to install, evaluated lazily.

install.missing

Should an attempt be made to install packages if they are not installed?

quiet

run without messages.

Examples

1
2
3
4
## Not run: 
using(tools)

## End(Not run)

halpo/short documentation built on July 18, 2019, 12:06 a.m.