ensure: Ensure that package libraries are installed and available.

Description Usage Arguments Value Examples

Description

Loads and attaches add-on packages. If the package is not present locally the package is installed from the CRAN repo. This is useful in making code run after new R installation or upon transfer to other machines.

Usage

1
ensure(packages.to.install = "tidyverse", verbose = FALSE)

Arguments

packages.to.install

- a vector containing names of add-on packages to install

verbose

- a TRUE/FALSE value for verbose operation

Value

messages from library installs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## simple installation of packages
##
## note that devtools needed to install package from github
 
library(devtools).
install_github("ww44ss/ensure.libraries")
library(ensure.libraries)

packages <- c("tidyverse",
              "ggplot2",
              "stringr",
              "ww44ss/yo"
              )

ensure(packages)
## end (not run)

ww44ss/ensure.libraries documentation built on May 4, 2019, 12:03 p.m.