auto_load: Auto load and install a list of package names

Description Usage Arguments Details Examples

View source: R/general.R

Description

This will automatically download a character vector of package names. If they are already installed, it will update them (optional).

Usage

1
2
auto_load(..., pkgs = NULL, update.all = FALSE,
  repos = getOption("repos"))

Arguments

...

unquoted package names

pkgs

character vector of package names.

update.all

If TRUE (default), will update all named packages automatically when run.

repos

Mirror to use for obtaining package

Details

This will only try to retreive packages from CRAN. It is good to load this at the beginning of a script If you want others to automatically download packages or give a script for someone to run with dependencies You can set update.all to FALSE if you don't want to try and update the packages each time it is run.

Examples

1
auto_load(ggplot2, "data.table")

iamamutt/mejr documentation built on May 18, 2019, 1:27 a.m.