grab_and_attach: grab_and_attach

Description Usage Arguments Value Examples

View source: R/grab_and_attach.R

Description

grab stands for - try to to load package, if it fails attempt to install, attach stands for - attaching the grabbed package to the search path of the R session.

Usage

1
2
3
4
5
6
grab_and_attach(
  ...,
  mirror = "https://cloud.r-project.org/",
  dependencies = TRUE,
  update_first = FALSE
)

Arguments

...

List of packages to install (accepts NSE or standard string values)

mirror

Will be passed down to 'repos' argument of 'install.packages'

dependencies

Will be passed down to 'dependencies' argument of 'install.packages'

update_first

Boolean, indicates if an update of the packages should be done first before the grabing procedure takes place.

Value

Does not have a return value, the successful outcome is that the indicated packages are loaded and attached.

Examples

1
grab_and_attach('lubridate', data.table, 'cli')

Patrikios/grab_and_attach documentation built on Jan. 3, 2022, 12:47 p.m.