check_install: Check and install packages.

Description Usage Arguments Value See Also Examples

Description

check_install checks if a package is already installed. If it is not installed, then install the package (from CRAN).

Usage

1
check_install(pkgs, repos = NULL, ...)

Arguments

pkgs

List or vector of packages to check and optionally install.

repos

Character vector of the base URL(s) of the repositories to use, e.g., the URL of a CRAN mirror.

...

List of options to pass install.packages.

Value

Invisibly returns the input pkgs list or vector. The function is called for its side effects.

See Also

Examples

1
2
3
4
5
6
7
req_pkgs <- list(
  "dplyr",
  "purrr",
  "rprojroot"
)

check_install(req_pkgs)

curtisalexander/CRAmisc documentation built on May 14, 2019, 12:52 p.m.